PhpBench\Tests\System\SystemTestCase::assertXPathExpression PHP Метод

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

protected assertXPathExpression ( $expected, $xmlString, $expression )
    protected function assertXPathExpression($expected, $xmlString, $expression)
    {
        $dom = new \DOMDocument();
        $result = @$dom->loadXml($xmlString);
        if (false === $result) {
            throw new \RuntimeException(sprintf('Could not load XML "%s"', $xmlString));
        }
        $xpath = new \DOMXPath($dom);
        $dom->formatOutput = true;
        $result = $xpath->evaluate($expression);
        $this->assertEquals($expected, $result);
    }