WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Symfony\Component\CssSelector\Tests\XPath

TranslatorTest::getCssToXPathTestData() public WC 1.0

Это метод класса: TranslatorTest{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$TranslatorTest = new TranslatorTest();
$TranslatorTest->getCssToXPathTestData();

Код TranslatorTest::getCssToXPathTestData() WC 4.5.2

woocommerce/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php
<?php
public function getCssToXPathTestData()
{
    return [
        ['*', '*'],
        ['e', 'e'],
        ['*|e', 'e'],
        ['e|f', 'e:f'],
        ['e[foo]', 'e[@foo]'],
        ['e[foo|bar]', 'e[@foo:bar]'],
        ['e[foo="bar"]', "e[@foo = 'bar']"],
        ['e[foo~="bar"]', "e[@foo and contains(concat(' ', normalize-space(@foo), ' '), ' bar ')]"],
        ['e[foo^="bar"]', "e[@foo and starts-with(@foo, 'bar')]"],
        ['e[foo$="bar"]', "e[@foo and substring(@foo, string-length(@foo)-2) = 'bar']"],
        ['e[foo*="bar"]', "e[@foo and contains(@foo, 'bar')]"],
        ['e[foo!="bar"]', "e[not(@foo) or @foo != 'bar']"],
        ['e[foo!="bar"][foo!="baz"]', "e[(not(@foo) or @foo != 'bar') and (not(@foo) or @foo != 'baz')]"],
        ['e[hreflang|="en"]', "e[@hreflang and (@hreflang = 'en' or starts-with(@hreflang, 'en-'))]"],
        ['e:nth-child(1)', "*/*[(name() = 'e') and (position() = 1)]"],
        ['e:nth-last-child(1)', "*/*[(name() = 'e') and (position() = last() - 0)]"],
        ['e:nth-last-child(2n+2)', "*/*[(name() = 'e') and (last() - position() - 1 >= 0 and (last() - position() - 1) mod 2 = 0)]"],
        ['e:nth-of-type(1)', '*/e[position() = 1]'],
        ['e:nth-last-of-type(1)', '*/e[position() = last() - 0]'],
        ['div e:nth-last-of-type(1) .aclass', "div/descendant-or-self::*/e[position() = last() - 0]/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' aclass ')]"],
        ['e:first-child', "*/*[(name() = 'e') and (position() = 1)]"],
        ['e:last-child', "*/*[(name() = 'e') and (position() = last())]"],
        ['e:first-of-type', '*/e[position() = 1]'],
        ['e:last-of-type', '*/e[position() = last()]'],
        ['e:only-child', "*/*[(name() = 'e') and (last() = 1)]"],
        ['e:only-of-type', 'e[count(preceding-sibling::e)=0 and count(following-sibling::e)=0]'],
        ['e:empty', 'e[not(*) and not(string-length())]'],
        ['e:EmPTY', 'e[not(*) and not(string-length())]'],
        ['e:root', 'e[not(parent::*)]'],
        ['e:hover', 'e[0]'],
        ['e:contains("foo")', "e[contains(string(.), 'foo')]"],
        ['e:ConTains(foo)', "e[contains(string(.), 'foo')]"],
        ['e.warning', "e[@class and contains(concat(' ', normalize-space(@class), ' '), ' warning ')]"],
        ['e#myid', "e[@id = 'myid']"],
        ['e:not(:nth-child(odd))', 'e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]'],
        ['e:nOT(*)', 'e[0]'],
        ['e f', 'e/descendant-or-self::*/f'],
        ['e > f', 'e/f'],
        ['e + f', "e/following-sibling::*[(name() = 'f') and (position() = 1)]"],
        ['e ~ f', 'e/following-sibling::f'],
        ['div#container p', "div[@id = 'container']/descendant-or-self::*/p"],
    ];
}