Skip to content

Commit f974b57

Browse files
committed
minor #11582 Update testing.rst (iiirxs)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #11582). Discussion ---------- Update testing.rst getAttribute function doesn't exist in Crawler class: use attr() instead: Error: Call to undefined method Symfony\Component\DomCrawler\Crawler::getAttribute() <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 0c05c83 Update testing.rst
2 parents 9c3cf6c + 0c05c83 commit f974b57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ narrow down your node selection by chaining the method calls::
626626
$crawler
627627
->filter('h1')
628628
->reduce(function ($node, $i) {
629-
if (!$node->getAttribute('class')) {
629+
if (!$node->attr('class')) {
630630
return false;
631631
}
632632
})

0 commit comments

Comments
 (0)