X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FApiBundle%2FController%2FWallabagRestControllerTest.php;h=5dcb3e000dac75d68f0026851856dcdc0692973b;hb=e4cf672ccf61689ba28c2e89fc55f83167800b18;hp=c797daf7aa3a9444e87df384fe87a4eb9f4c3789;hpb=e07c25a1adb2f89c5f57656e24a054ddd3a45df7;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php index c797daf7..5dcb3e00 100644 --- a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php @@ -803,6 +803,22 @@ class WallabagRestControllerTest extends WallabagApiTestCase $this->assertEquals(true, $content['exists']); } + public function testGetEntriesExistsWithManyUrls() + { + $url1 = 'http://0.0.0.0/entry2'; + $url2 = 'http://0.0.0.0/entry10'; + $this->client->request('GET', '/api/entries/exists?urls[]='.$url1.'&urls[]='.$url2); + + $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); + + $content = json_decode($this->client->getResponse()->getContent(), true); + + $this->assertArrayHasKey($url1, $content); + $this->assertArrayHasKey($url2, $content); + $this->assertEquals(true, $content[$url1]); + $this->assertEquals(false, $content[$url2]); + } + public function testGetEntriesExistsWhichDoesNotExists() { $this->client->request('GET', '/api/entries/exists?url=http://google.com/entry2');