public function TranslatorTest::testXmlLang in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php \Symfony\Component\CssSelector\Tests\XPath\TranslatorTest::testXmlLang()
@dataProvider getXmlLangTestData
File
- vendor/
symfony/ css-selector/ Tests/ XPath/ TranslatorTest.php, line 34
Class
Namespace
Symfony\Component\CssSelector\Tests\XPathCode
public function testXmlLang($css, array $elementsId) {
$translator = new Translator();
$document = new \SimpleXMLElement(file_get_contents(__DIR__ . '/Fixtures/lang.xml'));
$elements = $document
->xpath($translator
->cssToXPath($css));
$this
->assertEquals(count($elementsId), count($elements));
foreach ($elements as $element) {
$this
->assertTrue(in_array($element
->attributes()->id, $elementsId));
}
}