From 719ba257d3d6495eaa0f4ea749b5aa4740f94dda Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 29 Apr 2017 12:24:27 +0200 Subject: [PATCH] Fix tests --- src/Wallabag/ApiBundle/Controller/EntryRestController.php | 1 - .../ApiBundle/Controller/EntryRestControllerTest.php | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 0c98c242..ae6f0e3f 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php @@ -239,7 +239,6 @@ class EntryRestController extends WallabagRestController // handle multiple urls if (!empty($urls)) { - $results = []; foreach ($urls as $key => $url) { $entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId( $url, diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 64c24a2d..b732a8be 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php @@ -774,7 +774,7 @@ class EntryRestControllerTest extends WallabagApiTestCase { $list = [ 'http://www.lemonde.fr/musiques/article/2017/04/23/loin-de-la-politique-le-printemps-de-bourges-retombe-en-enfance_5115862_1654986.html', - 'http://0.0.0.0/entry6', + 'http://0.0.0.0/entry1', ]; $this->client->request('POST', '/api/entries/lists?urls='.json_encode($list)); @@ -787,13 +787,13 @@ class EntryRestControllerTest extends WallabagApiTestCase $this->assertEquals('http://www.lemonde.fr/musiques/article/2017/04/23/loin-de-la-politique-le-printemps-de-bourges-retombe-en-enfance_5115862_1654986.html', $content[0]['url']); $this->assertInternalType('int', $content[1]['entry']); - $this->assertEquals('http://0.0.0.0/entry6', $content[1]['url']); + $this->assertEquals('http://0.0.0.0/entry1', $content[1]['url']); } public function testDeleteEntriesListAction() { $list = [ - 'http://0.0.0.0/entry2', + 'http://www.lemonde.fr/musiques/article/2017/04/23/loin-de-la-politique-le-printemps-de-bourges-retombe-en-enfance_5115862_1654986.html', 'http://0.0.0.0/entry3', ]; @@ -804,7 +804,7 @@ class EntryRestControllerTest extends WallabagApiTestCase $content = json_decode($this->client->getResponse()->getContent(), true); $this->assertTrue($content[0]['entry']); - $this->assertEquals('http://0.0.0.0/entry2', $content[0]['url']); + $this->assertEquals('http://www.lemonde.fr/musiques/article/2017/04/23/loin-de-la-politique-le-printemps-de-bourges-retombe-en-enfance_5115862_1654986.html', $content[0]['url']); $this->assertFalse($content[1]['entry']); $this->assertEquals('http://0.0.0.0/entry3', $content[1]['url']); -- 2.41.0