diff --git a/composer.lock b/composer.lock index 1a21055..82eae6e 100644 --- a/composer.lock +++ b/composer.lock @@ -1470,6 +1470,62 @@ "time": "2016-03-21 07:27:21" }, { + "name": "symfony/dom-crawler", + "version": "2.8.x-dev", + "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", "source": { @@ -2763,12 +2819,12 @@ "source": { "type": "git", "url": "https://github.com/minkphp/Mink.git", - "reference": "39e330913923f7c5729e29e80d850816d322ecbb" + "reference": "12e09bf56d4892998518eff6e9be897ba23b7dc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/minkphp/Mink/zipball/39e330913923f7c5729e29e80d850816d322ecbb", - "reference": "39e330913923f7c5729e29e80d850816d322ecbb", + "url": "https://api.github.com/repos/minkphp/Mink/zipball/12e09bf56d4892998518eff6e9be897ba23b7dc1", + "reference": "12e09bf56d4892998518eff6e9be897ba23b7dc1", "shasum": "" }, "require": { @@ -2813,7 +2869,7 @@ "testing", "web" ], - "time": "2016-10-14 22:21:05" + "time": "2016-10-17 08:31:38" }, { "name": "behat/mink-browserkit-driver", @@ -4147,63 +4203,12 @@ "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": { + "symfony/dom-crawler": 20, "behat/mink": 20 }, "prefer-stable": true, diff --git a/core/composer.json b/core/composer.json index a1d4ba8..d0e279e 100644 --- a/core/composer.json +++ b/core/composer.json @@ -8,6 +8,7 @@ "symfony/class-loader": "~2.8", "symfony/console": "~2.8", "symfony/dependency-injection": "~2.8", + "symfony/dom-crawler": "2.8.x-dev", "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": "dev-master#39e330913923f7c5729e29e80d850816d322ecbb", + "behat/mink": "1.7.x-dev", "behat/mink-goutte-driver": "~1.2", "jcalderonzumba/gastonjs": "~1.0.2", "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", diff --git a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php index c4528a5..3b2061e 100644 --- a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php @@ -4,6 +4,7 @@ use Drupal\Core\Url; use Drupal\simpletest\WebTestBase; +use Drupal\Tests\simpletest\Functional\ThroughUITest; /** * Tests the Simpletest UI internal browser. @@ -131,7 +132,7 @@ public function testTestingThroughUI() { // A PHPUnit unit test. 'Drupal\Tests\action\Unit\Menu\ActionLocalTasksTest', // A PHPUnit functional test. - 'Drupal\FunctionalTests\BrowserTestBaseTest', + ThroughUITest::class, ); foreach ($tests as $test) { diff --git a/core/modules/simpletest/tests/src/Functional/ThroughUITest.php b/core/modules/simpletest/tests/src/Functional/ThroughUITest.php new file mode 100644 index 0000000..4873743 --- /dev/null +++ b/core/modules/simpletest/tests/src/Functional/ThroughUITest.php @@ -0,0 +1,23 @@ +pass('Success!'); + } + +} diff --git a/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php b/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php index 7bb0fb1..7ec5fc0 100644 --- a/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php +++ b/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php @@ -98,4 +98,14 @@ public function renderEncodedMarkup() { return ['#plain_text' => 'Bad html ']; } + /** + * Renders a page with pipe character in link test. + * + * @return array + * A render array as expected by drupal_render() + */ + public function renderPipeInLink() { + return ['#markup' => 'foo|bar|baz']; + } + } diff --git a/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml b/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml index cbcf6d8..9d07a34 100644 --- a/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml +++ b/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml @@ -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' diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php index 02085b9..6cba6b9 100644 --- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php +++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php @@ -124,6 +124,16 @@ public function testError() { } /** + * 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 text asserts. */ public function testLegacyTextAsserts() {