aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-31 10:29:30 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-31 10:29:30 +0100
commit71691fe44a7b2a80f3b9d96d54720cce7994ad08 (patch)
tree6089b5574ef56991d36701c84754f420cc3bd64f
parentfdcbdda1ade822e038727ff1b653b9702ba75d6a (diff)
parentaa6e27cf4fbbb4713b1cdc933c4719ae9da78c71 (diff)
downloadwallabag-71691fe44a7b2a80f3b9d96d54720cce7994ad08.tar.gz
wallabag-71691fe44a7b2a80f3b9d96d54720cce7994ad08.tar.zst
wallabag-71691fe44a7b2a80f3b9d96d54720cce7994ad08.zip
Merge pull request #1035 from j0k3r/refactor
Tests are working again
-rw-r--r--.travis.yml14
-rw-r--r--app/build.xml22
-rw-r--r--app/phpunit.xml.dist31
-rw-r--r--phpunit.xml.dist28
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php3
5 files changed, 67 insertions, 31 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
new file mode 100644
index 00000000..6593a2f0
--- /dev/null
+++ b/app/phpunit.xml.dist
@@ -0,0 +1,31 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<phpunit backupGlobals="false"
4 backupStaticAttributes="false"
5 colors="true"
6 convertErrorsToExceptions="true"
7 convertNoticesToExceptions="true"
8 convertWarningsToExceptions="true"
9 processIsolation="false"
10 stopOnFailure="false"
11 syntaxCheck="false"
12 bootstrap="bootstrap.php.cache"
13 >
14
15 <testsuites>
16 <testsuite name="wallabag Test Suite">
17 <directory>../src/Wallabag/CoreBundle/Tests</directory>
18 </testsuite>
19 </testsuites>
20
21 <filter>
22 <whitelist>
23 <directory>../src</directory>
24 <exclude>
25 <directory>../vendor</directory>
26 <directory>../src/Acme</directory>
27 <directory>../src/AppBundle</directory>
28 </exclude>
29 </whitelist>
30 </filter>
31</phpunit>
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
deleted file mode 100644
index a26ead3a..00000000
--- a/phpunit.xml.dist
+++ /dev/null
@@ -1,28 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
4<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
6 backupGlobals="false"
7 colors="true"
8>
9 <testsuites>
10 <testsuite name="wallabag Test Suite">
11 <directory>src/Wallabag/*Bundle/Tests</directory>
12 </testsuite>
13 </testsuites>
14
15 <filter>
16 <whitelist>
17 <directory>src</directory>
18 <exclude>
19 <directory>src/*Bundle/Resources</directory>
20 <directory>src/*Bundle/Tests</directory>
21 <directory>src/*/*Bundle/Resources</directory>
22 <directory>src/*/*Bundle/Tests</directory>
23 <directory>src/*/Bundle/*Bundle/Resources</directory>
24 <directory>src/*/Bundle/*Bundle/Tests</directory>
25 </exclude>
26 </whitelist>
27 </filter>
28</phpunit>
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}