private static function assertXpathNotEmpty($xml, $xpath, $comment = null) { $xml = new SimpleXMLElement($xml); static::assertNotEmpty((array) $xml->xpath($xpath), $comment ?: sprintf('Could not find "%s" in "%s"', $xpath, $xml)); }