diff --git a/src/Element/DocumentElement.php b/src/Element/DocumentElement.php index e5be9f993..057f73a11 100644 --- a/src/Element/DocumentElement.php +++ b/src/Element/DocumentElement.php @@ -46,6 +46,6 @@ public function getContent() */ public function hasContent(string $content) { - return $this->has('named', array('content', $content)); + return $this->has('named_partial', array('content', $content)); } } diff --git a/tests/Element/DocumentElementTest.php b/tests/Element/DocumentElementTest.php index cca3e295e..a61348394 100644 --- a/tests/Element/DocumentElementTest.php +++ b/tests/Element/DocumentElementTest.php @@ -164,8 +164,8 @@ public function testHasContent() $this->elementFinder->expects($this->exactly(2)) ->method('findAll') ->willReturnMap(array( - array('named', array('content', 'some content'), '//html', array($node1, $node2)), - array('named', array('content', 'some other content'), '//html', array()), + array('named_partial', array('content', 'some content'), '//html', array($node1, $node2)), + array('named_partial', array('content', 'some other content'), '//html', array()), )); $this->assertTrue($this->document->hasContent('some content'));