aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-04-01 21:53:57 +0200
committerJeremy <jeremy.benoist@gmail.com>2015-04-01 21:59:13 +0200
commit9744e97131182f413b51a0ce671ff273fc28a0bb (patch)
tree07bfb4eecce1e08934da8994f2f13bc706b1f9fb /src/Wallabag
parent769e19dc4ab1a068e8165a7b237f42a78a6d312f (diff)
downloadwallabag-9744e97131182f413b51a0ce671ff273fc28a0bb.tar.gz
wallabag-9744e97131182f413b51a0ce671ff273fc28a0bb.tar.zst
wallabag-9744e97131182f413b51a0ce671ff273fc28a0bb.zip
Fix tests
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php8
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php2
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php2
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php10
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 @@
1<?php 1<?php
2 2
3namespace Wallabag\CoreBundle\Tests\Controller; 3namespace Wallabag\ApiBundle\Tests\Controller;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; 5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6 6
@@ -177,10 +177,10 @@ class WallabagRestControllerTest extends WebTestCase
177 $content = json_decode($client->getResponse()->getContent(), true); 177 $content = json_decode($client->getResponse()->getContent(), true);
178 178
179 $this->assertGreaterThanOrEqual(1, count($content)); 179 $this->assertGreaterThanOrEqual(1, count($content));
180 $this->assertEmpty($content['_embedded']['items']); 180 $this->assertNotEmpty($content['_embedded']['items']);
181 $this->assertEquals(0, $content['total']); 181 $this->assertGreaterThanOrEqual(1, $content['total']);
182 $this->assertEquals(1, $content['page']); 182 $this->assertEquals(1, $content['page']);
183 $this->assertEquals(1, $content['pages']); 183 $this->assertGreaterThanOrEqual(1, $content['pages']);
184 184
185 $this->assertTrue( 185 $this->assertTrue(
186 $client->getResponse()->headers->contains( 186 $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
133 'rss' => array( 133 'rss' => array(
134 'username' => $user->getUsername(), 134 'username' => $user->getUsername(),
135 'token' => $config->getRssToken(), 135 'token' => $config->getRssToken(),
136 ) 136 ),
137 )); 137 ));
138 } 138 }
139 139
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
397 ); 397 );
398 398
399 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 399 $this->assertEquals(200, $client->getResponse()->getStatusCode());
400 $content = json_decode($client->getResponse()->getContent(), true);; 400 $content = json_decode($client->getResponse()->getContent(), true);
401 $this->assertArrayHasKey('token', $content); 401 $this->assertArrayHasKey('token', $content);
402 } 402 }
403 403
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 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Controller; 3namespace Wallabag\CoreBundle\Tests\Controller;
4 4
5use Wallabag\CoreBundle\Tests\WallabagTestCase; 5use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
6 6
7class RssControllerTest extends WallabagTestCase 7class RssControllerTest extends WallabagCoreTestCase
8{ 8{
9 public function validateDom($xml, $nb = null) 9 public function validateDom($xml, $nb = null)
10 { 10 {
@@ -36,13 +36,13 @@ class RssControllerTest extends WallabagTestCase
36 { 36 {
37 return array( 37 return array(
38 array( 38 array(
39 '/admin/YZIOAUZIAO/unread.xml' 39 '/admin/YZIOAUZIAO/unread.xml',
40 ), 40 ),
41 array( 41 array(
42 '/wallace/YZIOAUZIAO/starred.xml' 42 '/wallace/YZIOAUZIAO/starred.xml',
43 ), 43 ),
44 array( 44 array(
45 '/wallace/YZIOAUZIAO/archives.xml' 45 '/wallace/YZIOAUZIAO/archives.xml',
46 ), 46 ),
47 ); 47 );
48 } 48 }