You are here

public function TranslatorTest::getXpathLiteralTestData in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php \Symfony\Component\CssSelector\Tests\XPath\TranslatorTest::getXpathLiteralTestData()

File

vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php, line 80

Class

TranslatorTest

Namespace

Symfony\Component\CssSelector\Tests\XPath

Code

public function getXpathLiteralTestData() {
  return array(
    array(
      'foo',
      "'foo'",
    ),
    array(
      "foo's bar",
      '"foo\'s bar"',
    ),
    array(
      "foo's \"middle\" bar",
      'concat(\'foo\', "\'", \'s "middle" bar\')',
    ),
    array(
      "foo's 'middle' \"bar\"",
      'concat(\'foo\', "\'", \'s \', "\'", \'middle\', "\'", \' "bar"\')',
    ),
  );
}