Skip to content

Commit 0c05c83

Browse files
iiirxsjaviereguiluz
authored andcommitted
Update testing.rst
getAttribute function doesn't exist in Crawler class: use attr() instead: Error: Call to undefined method Symfony\Component\DomCrawler\Crawler::getAttribute()
1 parent 9c3cf6c commit 0c05c83

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)