From 4ffc77d9f574fd91e9ac811754c2aa42a06e582f Mon Sep 17 00:00:00 2001 From: Kimtrip Date: Fri, 30 Jan 2015 15:47:27 +0100 Subject: [PATCH 1/2] Move phpunit into app folder --- phpunit.xml.dist => app/phpunit.xml.dist | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) rename phpunit.xml.dist => app/phpunit.xml.dist (53%) diff --git a/phpunit.xml.dist b/app/phpunit.xml.dist similarity index 53% rename from phpunit.xml.dist rename to app/phpunit.xml.dist index a26ead3ad..0be14ca95 100644 --- a/phpunit.xml.dist +++ b/app/phpunit.xml.dist @@ -5,23 +5,21 @@ xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" backupGlobals="false" colors="true" + bootstrap="bootstrap.php.cache" > - src/Wallabag/*Bundle/Tests + ../src/Wallabag/CoreBundle/Tests - src + ../src - src/*Bundle/Resources - src/*Bundle/Tests - src/*/*Bundle/Resources - src/*/*Bundle/Tests - src/*/Bundle/*Bundle/Resources - src/*/Bundle/*Bundle/Tests + ../vendor + ../src/Acme + ../src/AppBundle From aa6e27cf4fbbb4713b1cdc933c4719ae9da78c71 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 31 Jan 2015 09:15:51 +0100 Subject: [PATCH 2/2] Tests are working again --- .travis.yml | 14 +++++++++++- app/build.xml | 22 +++++++++++++++++++ app/phpunit.xml.dist | 15 ++++++++----- .../Tests/Controller/EntryControllerTest.php | 3 +-- 4 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 app/build.xml diff --git a/.travis.yml b/.travis.yml index 2971c5b9e..1d90a7489 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,18 @@ language: php + php: + - 5.4 - 5.5 + - 5.6 + branches: only: - - refactor \ No newline at end of file + - refactor + +before_script: + - composer self-update + - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + +script: + - ant -f app/build.xml prepare + - phpunit -c app --coverage-text diff --git a/app/build.xml b/app/build.xml new file mode 100644 index 000000000..16ef73ed4 --- /dev/null +++ b/app/build.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/phpunit.xml.dist b/app/phpunit.xml.dist index 0be14ca95..6593a2f06 100644 --- a/app/phpunit.xml.dist +++ b/app/phpunit.xml.dist @@ -1,12 +1,17 @@ - - + > + ../src/Wallabag/CoreBundle/Tests diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php index af20f31f1..786ff8117 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 { $client = static::createClient(); - $crawler = $client->request('GET', '/app/index'); + $crawler = $client->request('GET', '/new'); $this->assertEquals(200, $client->getResponse()->getStatusCode()); - $this->assertTrue($crawler->filter('html:contains("Homepage")')->count() > 0); } }