From 9744e97131182f413b51a0ce671ff273fc28a0bb Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 1 Apr 2015 21:53:57 +0200 Subject: [PATCH 1/1] Fix tests --- .../Tests/Controller/WallabagRestControllerTest.php | 8 ++++---- .../CoreBundle/Controller/ConfigController.php | 2 +- .../Tests/Controller/ConfigControllerTest.php | 2 +- .../CoreBundle/Tests/Controller/RssControllerTest.php | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php index ea8ee072..b36ae7c6 100644 --- a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php @@ -1,6 +1,6 @@ getResponse()->getContent(), true); $this->assertGreaterThanOrEqual(1, count($content)); - $this->assertEmpty($content['_embedded']['items']); - $this->assertEquals(0, $content['total']); + $this->assertNotEmpty($content['_embedded']['items']); + $this->assertGreaterThanOrEqual(1, $content['total']); $this->assertEquals(1, $content['page']); - $this->assertEquals(1, $content['pages']); + $this->assertGreaterThanOrEqual(1, $content['pages']); $this->assertTrue( $client->getResponse()->headers->contains( diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 898c291f..62ef3eea 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -133,7 +133,7 @@ class ConfigController extends Controller 'rss' => array( 'username' => $user->getUsername(), 'token' => $config->getRssToken(), - ) + ), )); } diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php index 3c158922..a0145780 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php @@ -397,7 +397,7 @@ class ConfigControllerTest extends WallabagCoreTestCase ); $this->assertEquals(200, $client->getResponse()->getStatusCode()); - $content = json_decode($client->getResponse()->getContent(), true);; + $content = json_decode($client->getResponse()->getContent(), true); $this->assertArrayHasKey('token', $content); } diff --git a/src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php index 8f627b4b..b7c162a7 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php @@ -2,9 +2,9 @@ namespace Wallabag\CoreBundle\Tests\Controller; -use Wallabag\CoreBundle\Tests\WallabagTestCase; +use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; -class RssControllerTest extends WallabagTestCase +class RssControllerTest extends WallabagCoreTestCase { public function validateDom($xml, $nb = null) { @@ -36,13 +36,13 @@ class RssControllerTest extends WallabagTestCase { return array( array( - '/admin/YZIOAUZIAO/unread.xml' + '/admin/YZIOAUZIAO/unread.xml', ), array( - '/wallace/YZIOAUZIAO/starred.xml' + '/wallace/YZIOAUZIAO/starred.xml', ), array( - '/wallace/YZIOAUZIAO/archives.xml' + '/wallace/YZIOAUZIAO/archives.xml', ), ); } -- 2.41.0