Fix tests

This commit is contained in:
Jeremy 2015-04-01 21:53:57 +02:00
parent 769e19dc4a
commit 9744e97131
4 changed files with 11 additions and 11 deletions

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\CoreBundle\Tests\Controller; namespace Wallabag\ApiBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@ -177,10 +177,10 @@ class WallabagRestControllerTest extends WebTestCase
$content = json_decode($client->getResponse()->getContent(), true); $content = json_decode($client->getResponse()->getContent(), true);
$this->assertGreaterThanOrEqual(1, count($content)); $this->assertGreaterThanOrEqual(1, count($content));
$this->assertEmpty($content['_embedded']['items']); $this->assertNotEmpty($content['_embedded']['items']);
$this->assertEquals(0, $content['total']); $this->assertGreaterThanOrEqual(1, $content['total']);
$this->assertEquals(1, $content['page']); $this->assertEquals(1, $content['page']);
$this->assertEquals(1, $content['pages']); $this->assertGreaterThanOrEqual(1, $content['pages']);
$this->assertTrue( $this->assertTrue(
$client->getResponse()->headers->contains( $client->getResponse()->headers->contains(

View file

@ -133,7 +133,7 @@ class ConfigController extends Controller
'rss' => array( 'rss' => array(
'username' => $user->getUsername(), 'username' => $user->getUsername(),
'token' => $config->getRssToken(), 'token' => $config->getRssToken(),
) ),
)); ));
} }

View file

@ -397,7 +397,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
); );
$this->assertEquals(200, $client->getResponse()->getStatusCode()); $this->assertEquals(200, $client->getResponse()->getStatusCode());
$content = json_decode($client->getResponse()->getContent(), true);; $content = json_decode($client->getResponse()->getContent(), true);
$this->assertArrayHasKey('token', $content); $this->assertArrayHasKey('token', $content);
} }

View file

@ -2,9 +2,9 @@
namespace Wallabag\CoreBundle\Tests\Controller; 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) public function validateDom($xml, $nb = null)
{ {
@ -36,13 +36,13 @@ class RssControllerTest extends WallabagTestCase
{ {
return array( return array(
array( array(
'/admin/YZIOAUZIAO/unread.xml' '/admin/YZIOAUZIAO/unread.xml',
), ),
array( array(
'/wallace/YZIOAUZIAO/starred.xml' '/wallace/YZIOAUZIAO/starred.xml',
), ),
array( array(
'/wallace/YZIOAUZIAO/archives.xml' '/wallace/YZIOAUZIAO/archives.xml',
), ),
); );
} }