aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-01-31 09:15:51 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-01-31 09:35:50 +0100
commitaa6e27cf4fbbb4713b1cdc933c4719ae9da78c71 (patch)
tree6089b5574ef56991d36701c84754f420cc3bd64f
parent4ffc77d9f574fd91e9ac811754c2aa42a06e582f (diff)
downloadwallabag-aa6e27cf4fbbb4713b1cdc933c4719ae9da78c71.tar.gz
wallabag-aa6e27cf4fbbb4713b1cdc933c4719ae9da78c71.tar.zst
wallabag-aa6e27cf4fbbb4713b1cdc933c4719ae9da78c71.zip
Tests are working again
-rw-r--r--.travis.yml14
-rw-r--r--app/build.xml22
-rw-r--r--app/phpunit.xml.dist15
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php3
4 files changed, 46 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 2971c5b9..1d90a748 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,18 @@
1language: php 1language: php
2
2php: 3php:
4 - 5.4
3 - 5.5 5 - 5.5
6 - 5.6
7
4branches: 8branches:
5 only: 9 only:
6 - refactor \ No newline at end of file 10 - refactor
11
12before_script:
13 - composer self-update
14 - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
15
16script:
17 - ant -f app/build.xml prepare
18 - phpunit -c app --coverage-text
diff --git a/app/build.xml b/app/build.xml
new file mode 100644
index 00000000..16ef73ed
--- /dev/null
+++ b/app/build.xml
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="wallabag" default="build">
3 <target name="build" depends="prepare"/>
4
5 <target name="clean" description="Cleanup build artifacts">
6 <delete dir="${basedir}/app/cache"/>
7 </target>
8
9 <target name="prepare" depends="clean" description="Prepare for build">
10 <exec executable="composer">
11 <arg value="install"/>
12 <arg value="--dev"/>
13 <arg value="--no-interaction"/>
14 <arg value="--working-dir=.."/>
15 </exec>
16 <exec executable="php">
17 <arg value="${basedir}/../app/console"/>
18 <arg value="cache:clear"/>
19 <arg value="--env=test"/>
20 </exec>
21 </target>
22</project>
diff --git a/app/phpunit.xml.dist b/app/phpunit.xml.dist
index 0be14ca9..6593a2f0 100644
--- a/app/phpunit.xml.dist
+++ b/app/phpunit.xml.dist
@@ -1,12 +1,17 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2 2
3<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html --> 3<phpunit backupGlobals="false"
4<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 backupStaticAttributes="false"
5 xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
6 backupGlobals="false"
7 colors="true" 5 colors="true"
6 convertErrorsToExceptions="true"
7 convertNoticesToExceptions="true"
8 convertWarningsToExceptions="true"
9 processIsolation="false"
10 stopOnFailure="false"
11 syntaxCheck="false"
8 bootstrap="bootstrap.php.cache" 12 bootstrap="bootstrap.php.cache"
9> 13 >
14
10 <testsuites> 15 <testsuites>
11 <testsuite name="wallabag Test Suite"> 16 <testsuite name="wallabag Test Suite">
12 <directory>../src/Wallabag/CoreBundle/Tests</directory> 17 <directory>../src/Wallabag/CoreBundle/Tests</directory>
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index af20f31f..786ff811 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -10,9 +10,8 @@ class EntryControllerTest extends WebTestCase
10 { 10 {
11 $client = static::createClient(); 11 $client = static::createClient();
12 12
13 $crawler = $client->request('GET', '/app/index'); 13 $crawler = $client->request('GET', '/new');
14 14
15 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 15 $this->assertEquals(200, $client->getResponse()->getStatusCode());
16 $this->assertTrue($crawler->filter('html:contains("Homepage")')->count() > 0);
17 } 16 }
18} 17}