eZ\Publish\Core\REST\Common\Tests\Output\ValueObjectVisitorBaseTest::assertXPath PHP Метод

assertXPath() защищенный Метод

This method asserts that $xpathExpression results in a non-empty node set in context of $domNode, by wrapping the "boolean()" function around it and evaluating it on the document owning $domNode.
protected assertXPath ( DOMNode $domNode, string $xpathExpression )
$domNode DOMNode
$xpathExpression string
    protected function assertXPath(\DOMNode $domNode, $xpathExpression)
    {
        $ownerDocument = $domNode instanceof \DOMDOcument ? $domNode : $domNode->ownerDocument;
        $xpath = new \DOMXPath($ownerDocument);
        $this->assertTrue($xpath->evaluate("boolean({$xpathExpression})", $domNode), "XPath expression '{$xpathExpression}' resulted in an empty node set.");
    }