Make Crawler::extract get an array

This commit is contained in:
Yassine Guedidi 2023-08-07 22:40:16 +01:00
parent 9870785d59
commit 093003d9af
2 changed files with 2 additions and 2 deletions

View file

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

View file

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