Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
31
vendor/behat/mink/tests/Selector/Xpath/EscaperTest.php
vendored
Normal file
31
vendor/behat/mink/tests/Selector/Xpath/EscaperTest.php
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace Behat\Mink\Tests\Selector\Xpath;
|
||||
|
||||
use Behat\Mink\Selector\Xpath\Escaper;
|
||||
|
||||
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\')',
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
64
vendor/behat/mink/tests/Selector/Xpath/ManipulatorTest.php
vendored
Normal file
64
vendor/behat/mink/tests/Selector/Xpath/ManipulatorTest.php
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
namespace Behat\Mink\Tests\Selector\Xpath;
|
||||
|
||||
use Behat\Mink\Selector\Xpath\Manipulator;
|
||||
|
||||
class ManipulatorTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider getPrependedXpath
|
||||
*/
|
||||
public function testPrepend($prefix, $xpath, $expectedXpath)
|
||||
{
|
||||
$manipulator = new Manipulator();
|
||||
|
||||
$this->assertEquals($expectedXpath, $manipulator->prepend($xpath, $prefix));
|
||||
}
|
||||
|
||||
public function getPrependedXpath()
|
||||
{
|
||||
return array(
|
||||
'simple' => array(
|
||||
'some_xpath',
|
||||
'some_tag1',
|
||||
'some_xpath/some_tag1',
|
||||
),
|
||||
'with slash' => array(
|
||||
'some_xpath',
|
||||
'/some_tag1',
|
||||
'some_xpath/some_tag1',
|
||||
),
|
||||
'union' => array(
|
||||
'some_xpath',
|
||||
'some_tag1 | some_tag2',
|
||||
'some_xpath/some_tag1 | some_xpath/some_tag2',
|
||||
),
|
||||
'wrapped union' => array(
|
||||
'some_xpath',
|
||||
'(some_tag1 | some_tag2)/some_child',
|
||||
'(some_xpath/some_tag1 | some_xpath/some_tag2)/some_child',
|
||||
),
|
||||
'multiple wrapped union' => array(
|
||||
'some_xpath',
|
||||
'( ( some_tag1 | some_tag2)/some_child | some_tag3)/leaf',
|
||||
'( ( some_xpath/some_tag1 | some_xpath/some_tag2)/some_child | some_xpath/some_tag3)/leaf',
|
||||
),
|
||||
'parent union' => array(
|
||||
'some_xpath | another_xpath',
|
||||
'some_tag1 | some_tag2',
|
||||
'(some_xpath | another_xpath)/some_tag1 | (some_xpath | another_xpath)/some_tag2',
|
||||
),
|
||||
'complex condition' => array(
|
||||
'some_xpath',
|
||||
'some_tag1 | some_tag2[@foo = "bar|"] | some_tag3[foo | bar]',
|
||||
'some_xpath/some_tag1 | some_xpath/some_tag2[@foo = "bar|"] | some_xpath/some_tag3[foo | bar]',
|
||||
),
|
||||
'multiline' => array(
|
||||
'some_xpath',
|
||||
"some_tag1 | some_tag2[@foo =\n 'bar|'']\n | some_tag3[foo | bar]",
|
||||
"some_xpath/some_tag1 | some_xpath/some_tag2[@foo =\n 'bar|''] | some_xpath/some_tag3[foo | bar]",
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in a new issue