public function CssSelectorTest::testCssToXPath in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/css-selector/Tests/CssSelectorTest.php \Symfony\Component\CssSelector\Tests\CssSelectorTest::testCssToXPath()
File
- vendor/
symfony/ css-selector/ Tests/ CssSelectorTest.php, line 18
Class
Namespace
Symfony\Component\CssSelector\TestsCode
public function testCssToXPath() {
$this
->assertEquals('descendant-or-self::*', CssSelector::toXPath(''));
$this
->assertEquals('descendant-or-self::h1', CssSelector::toXPath('h1'));
$this
->assertEquals("descendant-or-self::h1[@id = 'foo']", CssSelector::toXPath('h1#foo'));
$this
->assertEquals("descendant-or-self::h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]", CssSelector::toXPath('h1.foo'));
$this
->assertEquals('descendant-or-self::foo:h1', CssSelector::toXPath('foo|h1'));
}