1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-27 17:28:39 +00:00
wallabag/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php

34 lines
976 B
PHP
Raw Normal View History

2015-02-06 18:02:12 +01:00
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class WallabagRestControllerTest extends WebTestCase
{
2015-02-10 20:07:55 +01:00
public function testGetSalt()
{
$client = $this->createClient();
$client->request('GET', '/api/salts/admin.json');
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$client->request('GET', '/api/salts/notfound.json');
$this->assertEquals(404, $client->getResponse()->getStatusCode());
}
public function testEmptyGetEntries()
{
2015-02-06 18:02:12 +01:00
$client = $this->createClient();
$client->request('GET', '/api/entries');
$this->assertTrue($client->getResponse()->isOk());
$this->assertTrue(
$client->getResponse()->headers->contains(
'Content-Type',
'application/json'
)
);
$this->assertEquals('[]', $client->getResponse()->getContent());
}
2015-02-10 20:07:55 +01:00
}