From 52219767d095ea7aeacc6d49a3f4f8477de01175 Mon Sep 17 00:00:00 2001 From: iiirxs Date: Fri, 17 May 2019 16:21:20 +0300 Subject: [PATCH] Update testing.rst getAttribute function doesn't exist in Crawler class: use attr() instead: Error: Call to undefined method Symfony\Component\DomCrawler\Crawler::getAttribute() --- testing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing.rst b/testing.rst index 178db73052a..39f27264cd1 100644 --- a/testing.rst +++ b/testing.rst @@ -652,7 +652,7 @@ narrow down your node selection by chaining the method calls:: $crawler ->filter('h1') ->reduce(function ($node, $i) { - if (!$node->getAttribute('class')) { + if (!$node->attr('class')) { return false; } })