Issue #2808085 by klausi, claudiu.cristea, stof, nicolas.grekas: Pipe char in locators break Mink and Symfony element search
parent
2542cdb0c6
commit
5a88934ee9
|
@ -1469,6 +1469,62 @@
|
|||
"homepage": "https://symfony.com",
|
||||
"time": "2016-03-21 07:27:21"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v2.8.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dom-crawler.git",
|
||||
"reference": "a94f3fe6f179d6453e5ed8188cf4bfdf933d85f4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/a94f3fe6f179d6453e5ed8188cf4bfdf933d85f4",
|
||||
"reference": "a94f3fe6f179d6453e5ed8188cf4bfdf933d85f4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.9",
|
||||
"symfony/polyfill-mbstring": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/css-selector": "~2.8|~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/css-selector": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.8-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\DomCrawler\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony DomCrawler Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-10-18 15:35:45"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v2.8.4",
|
||||
|
@ -2759,16 +2815,16 @@
|
|||
"packages-dev": [
|
||||
{
|
||||
"name": "behat/mink",
|
||||
"version": "v1.7.1",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/minkphp/Mink.git",
|
||||
"reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9"
|
||||
"reference": "12e09bf56d4892998518eff6e9be897ba23b7dc1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/minkphp/Mink/zipball/e6930b9c74693dff7f4e58577e1b1743399f3ff9",
|
||||
"reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9",
|
||||
"url": "https://api.github.com/repos/minkphp/Mink/zipball/12e09bf56d4892998518eff6e9be897ba23b7dc1",
|
||||
"reference": "12e09bf56d4892998518eff6e9be897ba23b7dc1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2813,7 +2869,7 @@
|
|||
"testing",
|
||||
"web"
|
||||
],
|
||||
"time": "2016-03-05 08:26:18"
|
||||
"time": "2016-10-17 08:31:38"
|
||||
},
|
||||
{
|
||||
"name": "behat/mink-browserkit-driver",
|
||||
|
@ -4147,63 +4203,13 @@
|
|||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-03-04 07:54:35"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v2.7.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dom-crawler.git",
|
||||
"reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5fef7d8b80d8f9992df99d8ee283f420484c9612",
|
||||
"reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/css-selector": "~2.3"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/css-selector": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.7-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\DomCrawler\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony DomCrawler Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2015-10-11 09:39:48"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
"stability-flags": {
|
||||
"behat/mink": 20
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"symfony/class-loader": "~2.8",
|
||||
"symfony/console": "~2.8",
|
||||
"symfony/dependency-injection": "~2.8",
|
||||
"symfony/dom-crawler": ">=2.8.13 <3.0",
|
||||
"symfony/event-dispatcher": "~2.8",
|
||||
"symfony/http-foundation": "~2.8",
|
||||
"symfony/http-kernel": "~2.8",
|
||||
|
@ -35,7 +36,7 @@
|
|||
"asm89/stack-cors": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"behat/mink": "~1.7",
|
||||
"behat/mink": "1.7.x-dev",
|
||||
"behat/mink-goutte-driver": "~1.2",
|
||||
"jcalderonzumba/gastonjs": "~1.0.2",
|
||||
"jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
|
||||
|
|
|
@ -98,4 +98,14 @@ class Test {
|
|||
return ['#plain_text' => 'Bad html <script>alert(123);</script>'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a page with pipe character in link test.
|
||||
*
|
||||
* @return array
|
||||
* A render array as expected by drupal_render()
|
||||
*/
|
||||
public function renderPipeInLink() {
|
||||
return ['#markup' => '<a href="http://example.com">foo|bar|baz</a>'];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -66,3 +66,11 @@ test_page_test.encoded:
|
|||
_controller: '\Drupal\test_page_test\Controller\Test::renderEncodedMarkup'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
test_page_test.pipe:
|
||||
path: '/test-pipe-char'
|
||||
defaults:
|
||||
_title: 'Page with pipe char in link'
|
||||
_controller: '\Drupal\test_page_test\Controller\Test::renderPipeInLink'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
@ -123,6 +123,16 @@ class BrowserTestBaseTest extends BrowserTestBase {
|
|||
$this->drupalGet('test-error');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests linkExists() with pipe character (|) in locator.
|
||||
*
|
||||
* @see \Drupal\Tests\WebAssert::linkExists()
|
||||
*/
|
||||
public function testPipeCharInLocator() {
|
||||
$this->drupalGet('test-pipe-char');
|
||||
$this->assertSession()->linkExists('foo|bar|baz');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests legacy asserts.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue