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
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Wallabag\ApiBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@ -177,10 +177,10 @@ class WallabagRestControllerTest extends WebTestCase
$content = json_decode($client->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(

View File

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

View File

@ -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);
}

View File

@ -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',
),
);
}