class EscaperTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/tests/Selector/Xpath/EscaperTest.php \Behat\Mink\Tests\Selector\Xpath\EscaperTest
Hierarchy
- class \Behat\Mink\Tests\Selector\Xpath\EscaperTest extends \Behat\Mink\Tests\Selector\Xpath\PHPUnit_Framework_TestCase
Expanded class hierarchy of EscaperTest
File
- vendor/
behat/ mink/ tests/ Selector/ Xpath/ EscaperTest.php, line 7
Namespace
Behat\Mink\Tests\Selector\XpathView source
class EscaperTest extends \PHPUnit_Framework_TestCase {
/**
* @dataProvider getXpathLiterals
*/
public function testXpathLiteral($string, $expected) {
$escaper = new Escaper();
$this
->assertEquals($expected, $escaper
->escapeLiteral($string));
}
public function getXpathLiterals() {
return array(
array(
'some simple string',
"'some simple string'",
),
array(
'some "d-brackets" string',
"'some \"d-brackets\" string'",
),
array(
'some \'s-brackets\' string',
"\"some 's-brackets' string\"",
),
array(
'some \'s-brackets\' and "d-brackets" string',
'concat(\'some \',"\'",\'s-brackets\',"\'",\' and "d-brackets" string\')',
),
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EscaperTest:: |
public | function | ||
EscaperTest:: |
public | function | @dataProvider getXpathLiterals |