From 8c9316d4ded97c7bfe078e9a1f23296430e74cc9 Mon Sep 17 00:00:00 2001 From: Pascal CESCON - Amoifr Date: Tue, 18 Aug 2026 15:53:24 +0200 Subject: [PATCH] Use the named_partial selector in DocumentElement::hasContent() --- src/Element/DocumentElement.php | 2 +- tests/Element/DocumentElementTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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'));