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