Merge pull request #6812 from yguedidi/make-crawler-extract-get-an-array

Make Crawler::extract get an array
This commit is contained in:
Kevin Decherf 2023-08-09 11:03:03 +02:00 committed by GitHub
commit 0ccbd653fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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]);
}