From 093003d9af10d4cf47b8a540c8979b8f2355cb92 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 7 Aug 2023 22:40:16 +0100 Subject: [PATCH] Make Crawler::extract get an array --- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 2 +- tests/Wallabag/UserBundle/Controller/ManageControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 3ed584143..a6e0f395b 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -1654,7 +1654,7 @@ class EntryControllerTest extends WallabagCoreTestCase // As long as the deletion link of a tag is following // a link to the tag view, we take the second one to retrieve // the deletion link of the first tag - $link = $crawler->filter('body div#article div.tools ul.tags li.chip a')->extract('href')[1]; + $link = $crawler->filter('body div#article div.tools ul.tags li.chip a')->extract(['href'])[1]; $this->assertSame(sprintf('/remove-tag/%s/%s', $entry->getId(), $tag->getId()), $link); } diff --git a/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php b/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php index e3a8bfc16..86b49b698 100644 --- a/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php +++ b/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php @@ -74,7 +74,7 @@ class ManageControllerTest extends WallabagCoreTestCase $client = $this->getTestClient(); $crawler = $client->request('GET', '/users/' . $this->getLoggedInUserId() . '/edit'); - $disabled = $crawler->selectButton('user.form.delete')->extract('disabled'); + $disabled = $crawler->selectButton('user.form.delete')->extract(['disabled']); $this->assertSame('disabled', $disabled[0]); }