summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorwebchick2015-10-05 06:32:44 (GMT)
committerwebchick2015-10-05 06:32:44 (GMT)
commit74a8fc8395b1793d9667d5e48cd4eac766f1f7e0 (patch)
treec91ea77f39ec9493677c3443c00980b11a1fe208 /vendor
parent5b5d4035bdaf3fae9169feb9f52bedc5bdf3e80d (diff)
Issue #2578815 by hussainweb: Upgrade behat/mink and behat/mink-goutte-driver
Diffstat (limited to 'vendor')
-rw-r--r--vendor/behat/mink-browserkit-driver/.travis.yml15
-rw-r--r--vendor/behat/mink-browserkit-driver/CHANGELOG.md21
-rwxr-xr-xvendor/behat/mink-browserkit-driver/README.md10
-rw-r--r--vendor/behat/mink-browserkit-driver/composer.json15
-rw-r--r--vendor/behat/mink-browserkit-driver/phpunit.xml.dist2
-rw-r--r--vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php (renamed from vendor/behat/mink-browserkit-driver/src/Behat/Mink/Driver/BrowserKitDriver.php)138
-rw-r--r--vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php2
-rw-r--r--vendor/behat/mink-goutte-driver/.travis.yml22
-rw-r--r--vendor/behat/mink-goutte-driver/CHANGELOG.md11
-rw-r--r--vendor/behat/mink-goutte-driver/composer.json6
-rw-r--r--vendor/behat/mink/.travis.yml19
-rw-r--r--vendor/behat/mink/CHANGES.md42
-rw-r--r--vendor/behat/mink/LICENSE2
-rw-r--r--vendor/behat/mink/composer.json8
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/AbstractConfig.php2
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Basic/BestPracticesTest.php84
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Basic/ContentTest.php12
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Basic/CookieTest.php3
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Basic/ErrorHandlingTest.php3
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Basic/HeaderTest.php3
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Basic/NavigationTest.php8
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Basic/TraversingTest.php38
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Basic/VisibilityTest.php2
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Form/CheckboxTest.php4
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Form/GeneralTest.php22
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Form/SelectTest.php5
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Js/ChangeEventTest.php7
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Js/EventsTest.php2
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Js/JavascriptEvaluationTest.php4
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Js/JavascriptTest.php2
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/Js/WindowTest.php8
-rw-r--r--vendor/behat/mink/driver-testsuite/tests/TestCase.php19
-rw-r--r--vendor/behat/mink/driver-testsuite/web-fixtures/element_change_detector.html2
-rw-r--r--vendor/behat/mink/driver-testsuite/web-fixtures/index.html4
-rw-r--r--vendor/behat/mink/driver-testsuite/web-fixtures/issue225.html2
-rw-r--r--vendor/behat/mink/driver-testsuite/web-fixtures/js_test.html14
-rw-r--r--vendor/behat/mink/src/Driver/CoreDriver.php30
-rw-r--r--vendor/behat/mink/src/Driver/DriverInterface.php36
-rw-r--r--vendor/behat/mink/src/Element/DocumentElement.php4
-rw-r--r--vendor/behat/mink/src/Element/Element.php19
-rw-r--r--vendor/behat/mink/src/Element/ElementInterface.php3
-rw-r--r--vendor/behat/mink/src/Element/NodeElement.php26
-rw-r--r--vendor/behat/mink/src/Element/TraversableElement.php36
-rw-r--r--vendor/behat/mink/src/Exception/ElementException.php6
-rw-r--r--vendor/behat/mink/src/Exception/ElementHtmlException.php15
-rw-r--r--vendor/behat/mink/src/Exception/ElementNotFoundException.php13
-rw-r--r--vendor/behat/mink/src/Exception/ExpectationException.php56
-rw-r--r--vendor/behat/mink/src/Exception/ResponseTextException.php2
-rw-r--r--vendor/behat/mink/src/Mink.php2
-rw-r--r--vendor/behat/mink/src/Selector/NamedSelector.php37
-rw-r--r--vendor/behat/mink/src/Selector/SelectorsHandler.php12
-rw-r--r--vendor/behat/mink/src/Selector/Xpath/Escaper.php2
-rw-r--r--vendor/behat/mink/src/Session.php47
-rw-r--r--vendor/behat/mink/src/WebAssert.php170
-rw-r--r--vendor/behat/mink/tests/Driver/CoreDriverTest.php34
-rw-r--r--vendor/behat/mink/tests/Element/DocumentElementTest.php3
-rw-r--r--vendor/behat/mink/tests/Element/ElementTest.php7
-rw-r--r--vendor/behat/mink/tests/Element/NodeElementTest.php19
-rw-r--r--vendor/behat/mink/tests/Exception/ElementExceptionTest.php3
-rw-r--r--vendor/behat/mink/tests/Exception/ElementHtmlExceptionTest.php17
-rw-r--r--vendor/behat/mink/tests/Exception/ElementNotFoundExceptionTest.php24
-rw-r--r--vendor/behat/mink/tests/Exception/ElementTextExceptionTest.php17
-rw-r--r--vendor/behat/mink/tests/Exception/ExpectationExceptionTest.php62
-rw-r--r--vendor/behat/mink/tests/Exception/ResponseTextExceptionTest.php34
-rw-r--r--vendor/behat/mink/tests/Selector/NamedSelectorTest.php22
-rw-r--r--vendor/behat/mink/tests/Selector/SelectorsHandlerTest.php8
-rw-r--r--vendor/behat/mink/tests/Selector/fixtures/test.html2
-rw-r--r--vendor/behat/mink/tests/SessionTest.php23
-rw-r--r--vendor/behat/mink/tests/WebAssertTest.php164
-rw-r--r--vendor/composer/autoload_namespaces.php1
-rw-r--r--vendor/composer/autoload_psr4.php2
-rw-r--r--vendor/composer/installed.json343
72 files changed, 1210 insertions, 654 deletions
diff --git a/vendor/behat/mink-browserkit-driver/.travis.yml b/vendor/behat/mink-browserkit-driver/.travis.yml
index 838fc4e..9c08e64 100644
--- a/vendor/behat/mink-browserkit-driver/.travis.yml
+++ b/vendor/behat/mink-browserkit-driver/.travis.yml
@@ -1,5 +1,7 @@
language: php
+sudo: false
+
php: [5.3, 5.4, 5.5, 5.6, hhvm]
matrix:
@@ -9,12 +11,17 @@ matrix:
- php: 5.5
env: SYMFONY_VERSION='2.5.*@dev'
-before_script:
+cache:
+ directories:
+ - $HOME/.composer/cache/files
+
+before_install:
- sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require -n --no-update symfony/symfony=$SYMFONY_VERSION; fi;'
- - composer install -n --prefer-source
+
+install:
+ - composer install -n
script: phpunit -v --coverage-clover=coverage.clover
after_script:
- - wget https://scrutinizer-ci.com/ocular.phar
- - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
+ - wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
diff --git a/vendor/behat/mink-browserkit-driver/CHANGELOG.md b/vendor/behat/mink-browserkit-driver/CHANGELOG.md
index 774663f..1b8e790 100644
--- a/vendor/behat/mink-browserkit-driver/CHANGELOG.md
+++ b/vendor/behat/mink-browserkit-driver/CHANGELOG.md
@@ -1,3 +1,24 @@
+1.3.0 / 2015-09-21
+==================
+
+BC break:
+
+* Dropped support for Symfony 2.2 and older
+* Bumped required PHP version to 5.3.6
+
+New features:
+
+* Updated the driver to use findElementsXpaths for Mink 1.7 and forward compatibility with Mink 2
+
+Bug fixes:
+
+* Improved the exception message when clicking on an invalid element
+* Use `saveHTML` to get correct HTML code back
+
+Misc:
+
+* Updated the repository structure to PSR-4
+
1.2.0 / 2014-09-26
==================
diff --git a/vendor/behat/mink-browserkit-driver/README.md b/vendor/behat/mink-browserkit-driver/README.md
index fc36e41..1903a5f 100755
--- a/vendor/behat/mink-browserkit-driver/README.md
+++ b/vendor/behat/mink-browserkit-driver/README.md
@@ -4,9 +4,9 @@ Mink BrowserKit Driver
[![Latest Stable Version](https://poser.pugx.org/behat/mink-browserkit-driver/v/stable.png)](https://packagist.org/packages/behat/mink-browserkit-driver)
[![Latest Unstable Version](https://poser.pugx.org/behat/mink-browserkit-driver/v/unstable.svg)](https://packagist.org/packages/behat/mink-browserkit-driver)
[![Total Downloads](https://poser.pugx.org/behat/mink-browserkit-driver/downloads.png)](https://packagist.org/packages/behat/mink-browserkit-driver)
-[![Build Status](https://travis-ci.org/Behat/MinkBrowserKitDriver.svg?branch=master)](https://travis-ci.org/Behat/MinkBrowserKitDriver)
-[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/Behat/MinkBrowserKitDriver/badges/quality-score.png?s=0443d284940e099ea560eb39b6b2fcdc5d4e7f29)](https://scrutinizer-ci.com/g/Behat/MinkBrowserKitDriver/)
-[![Code Coverage](https://scrutinizer-ci.com/g/Behat/MinkBrowserKitDriver/badges/coverage.png?s=48960c4495488ab0b7d310b62322f017497f5bfa)](https://scrutinizer-ci.com/g/Behat/MinkBrowserKitDriver/)
+[![Build Status](https://travis-ci.org/minkphp/MinkBrowserKitDriver.svg?branch=master)](https://travis-ci.org/minkphp/MinkBrowserKitDriver)
+[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/minkphp/MinkBrowserKitDriver/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/minkphp/MinkBrowserKitDriver/)
+[![Code Coverage](https://scrutinizer-ci.com/g/minkphp/MinkBrowserKitDriver/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/minkphp/MinkBrowserKitDriver/)
[![License](https://poser.pugx.org/behat/mink-browserkit-driver/license.svg)](https://packagist.org/packages/behat/mink-browserkit-driver)
Usage Example
@@ -50,5 +50,5 @@ $> php composer.phar install
Maintainers
-----------
-* Konstantin Kudryashov [everzet](http://github.com/everzet)
-* Other [awesome developers](https://github.com/Behat/MinkBrowserKitDriver/graphs/contributors)
+* Christophe Coevoet [stof](https://github.com/stof)
+* Other [awesome developers](https://github.com/minkphp/MinkBrowserKitDriver/graphs/contributors)
diff --git a/vendor/behat/mink-browserkit-driver/composer.json b/vendor/behat/mink-browserkit-driver/composer.json
index c0c5df9..7d12bbc 100644
--- a/vendor/behat/mink-browserkit-driver/composer.json
+++ b/vendor/behat/mink-browserkit-driver/composer.json
@@ -15,19 +15,20 @@
],
"require": {
- "php": ">=5.3.1",
- "behat/mink": "~1.6@dev",
- "symfony/browser-kit": "~2.0",
- "symfony/dom-crawler": "~2.0"
+ "php": ">=5.3.6",
+ "behat/mink": "~1.7@dev",
+ "symfony/browser-kit": "~2.3",
+ "symfony/dom-crawler": "~2.3"
},
"require-dev": {
+ "symfony/phpunit-bridge": "~2.7",
"silex/silex": "~1.2"
},
"autoload": {
- "psr-0": {
- "Behat\\Mink\\Driver": "src/"
+ "psr-4": {
+ "Behat\\Mink\\Driver\\": "src/"
}
},
@@ -39,7 +40,7 @@
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "1.3.x-dev"
}
}
}
diff --git a/vendor/behat/mink-browserkit-driver/phpunit.xml.dist b/vendor/behat/mink-browserkit-driver/phpunit.xml.dist
index 4f9b932..d91581c 100644
--- a/vendor/behat/mink-browserkit-driver/phpunit.xml.dist
+++ b/vendor/behat/mink-browserkit-driver/phpunit.xml.dist
@@ -15,7 +15,7 @@
<filter>
<whitelist>
- <directory>./src/Behat/Mink/Driver</directory>
+ <directory>./src</directory>
</whitelist>
</filter>
</phpunit>
diff --git a/vendor/behat/mink-browserkit-driver/src/Behat/Mink/Driver/BrowserKitDriver.php b/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
index 28b99dc..70682e7 100644
--- a/vendor/behat/mink-browserkit-driver/src/Behat/Mink/Driver/BrowserKitDriver.php
+++ b/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
@@ -10,13 +10,10 @@
namespace Behat\Mink\Driver;
-use Behat\Mink\Element\NodeElement;
use Behat\Mink\Exception\DriverException;
use Behat\Mink\Exception\UnsupportedDriverActionException;
-use Behat\Mink\Session;
use Symfony\Component\BrowserKit\Client;
use Symfony\Component\BrowserKit\Cookie;
-use Symfony\Component\BrowserKit\Request;
use Symfony\Component\BrowserKit\Response;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\DomCrawler\Field\ChoiceFormField;
@@ -25,8 +22,6 @@ use Symfony\Component\DomCrawler\Field\FormField;
use Symfony\Component\DomCrawler\Field\InputFormField;
use Symfony\Component\DomCrawler\Field\TextareaFormField;
use Symfony\Component\DomCrawler\Form;
-use Symfony\Component\HttpFoundation\Request as HttpFoundationRequest;
-use Symfony\Component\HttpFoundation\Response as HttpFoundationResponse;
use Symfony\Component\HttpKernel\Client as HttpKernelClient;
/**
@@ -36,7 +31,6 @@ use Symfony\Component\HttpKernel\Client as HttpKernelClient;
*/
class BrowserKitDriver extends CoreDriver
{
- private $session;
private $client;
/**
@@ -75,14 +69,6 @@ class BrowserKitDriver extends CoreDriver
}
/**
- * {@inheritdoc}
- */
- public function setSession(Session $session)
- {
- $this->session = $session;
- }
-
- /**
* Tells driver to remove hostname from URL.
*
* @param Boolean $remove
@@ -164,19 +150,7 @@ class BrowserKitDriver extends CoreDriver
*/
public function getCurrentUrl()
{
- if (method_exists($this->client, 'getInternalRequest')) {
- $request = $this->client->getInternalRequest();
- } else {
- // BC layer for BrowserKit 2.2.x and older
- $request = $this->client->getRequest();
-
- if (null !== $request && !$request instanceof Request && !$request instanceof HttpFoundationRequest) {
- throw new DriverException(sprintf(
- 'The BrowserKit client returned an unsupported request implementation: %s. Please upgrade your BrowserKit package to 2.3 or newer.',
- get_class($request)
- ));
- }
- }
+ $request = $this->client->getInternalRequest();
if ($request === null) {
throw new DriverException('Unable to access the request before visiting a page');
@@ -345,13 +319,13 @@ class BrowserKitDriver extends CoreDriver
/**
* {@inheritdoc}
*/
- public function find($xpath)
+ public function findElementXpaths($xpath)
{
$nodes = $this->getCrawler()->filterXPath($xpath);
$elements = array();
foreach ($nodes as $i => $node) {
- $elements[] = new NodeElement(sprintf('(%s)[%d]', $xpath, $i + 1), $this->session);
+ $elements[] = sprintf('(%s)[%d]', $xpath, $i + 1);
}
return $elements;
@@ -393,7 +367,7 @@ class BrowserKitDriver extends CoreDriver
{
$node = $this->getCrawlerNode($this->getFilteredCrawler($xpath));
- return $node->ownerDocument->saveXML($node);
+ return $node->ownerDocument->saveHTML($node);
}
/**
@@ -415,7 +389,7 @@ class BrowserKitDriver extends CoreDriver
*/
public function getValue($xpath)
{
- if (in_array($this->getAttribute($xpath, 'type'), array('submit', 'image', 'button'))) {
+ if (in_array($this->getAttribute($xpath, 'type'), array('submit', 'image', 'button'), true)) {
return $this->getAttribute($xpath, 'value');
}
@@ -487,7 +461,7 @@ class BrowserKitDriver extends CoreDriver
$selectField = $this->getFormField('(' . $xpath . ')/ancestor-or-self::*[local-name()="select"]');
$selectValue = $selectField->getValue();
- return is_array($selectValue) ? in_array($optionValue, $selectValue) : $optionValue == $selectValue;
+ return is_array($selectValue) ? in_array($optionValue, $selectValue, true) : $optionValue === $selectValue;
}
/**
@@ -495,19 +469,19 @@ class BrowserKitDriver extends CoreDriver
*/
public function click($xpath)
{
- $node = $this->getFilteredCrawler($xpath);
- $crawlerNode = $this->getCrawlerNode($node);
- $tagName = $crawlerNode->nodeName;
+ $crawler = $this->getFilteredCrawler($xpath);
+ $node = $this->getCrawlerNode($crawler);
+ $tagName = $node->nodeName;
if ('a' === $tagName) {
- $this->client->click($node->link());
+ $this->client->click($crawler->link());
$this->forms = array();
- } elseif ($this->canSubmitForm($crawlerNode)) {
- $this->submit($node->form());
- } elseif ($this->canResetForm($crawlerNode)) {
- $this->resetForm($crawlerNode);
+ } elseif ($this->canSubmitForm($node)) {
+ $this->submit($crawler->form());
+ } elseif ($this->canResetForm($node)) {
+ $this->resetForm($node);
} else {
- $message = sprintf('%%s supports clicking on links and buttons only. But "%s" provided', $tagName);
+ $message = sprintf('%%s supports clicking on links and submit or reset buttons only. But "%s" provided', $tagName);
throw new UnsupportedDriverActionException($message, $this);
}
@@ -564,16 +538,6 @@ class BrowserKitDriver extends CoreDriver
*/
protected function getResponse()
{
- if (!method_exists($this->client, 'getInternalResponse')) {
- $implementationResponse = $this->client->getResponse();
-
- if (null === $implementationResponse) {
- throw new DriverException('Unable to access the response before visiting a page');
- }
-
- return $this->convertImplementationResponse($implementationResponse);
- }
-
$response = $this->client->getInternalResponse();
if (null === $response) {
@@ -584,64 +548,6 @@ class BrowserKitDriver extends CoreDriver
}
/**
- * Gets the BrowserKit Response for legacy BrowserKit versions.
- *
- * Before 2.3.0, there was no Client::getInternalResponse method, and the
- * return value of Client::getResponse can be anything when the implementation
- * uses Client::filterResponse because of a bad choice done in BrowserKit and
- * kept for BC reasons (the Client::getInternalResponse method has been added
- * to solve it).
- *
- * This implementation supports client which don't rely Client::filterResponse
- * and clients which use an HttpFoundation Response (like the HttpKernel client).
- *
- * @param object $response the response specific to the BrowserKit implementation
- *
- * @return Response
- *
- * @throws DriverException If the response cannot be converted to a BrowserKit response
- */
- private function convertImplementationResponse($response)
- {
- if ($response instanceof Response) {
- return $response;
- }
-
- // due to a bug, the HttpKernel client implementation returns the HttpFoundation response
- // The conversion logic is copied from Symfony\Component\HttpKernel\Client::filterResponse
- if ($response instanceof HttpFoundationResponse) {
- $headers = $response->headers->all();
- if ($response->headers->getCookies()) {
- $cookies = array();
- foreach ($response->headers->getCookies() as $cookie) {
- $cookies[] = new Cookie(
- $cookie->getName(),
- $cookie->getValue(),
- $cookie->getExpiresTime(),
- $cookie->getPath(),
- $cookie->getDomain(),
- $cookie->isSecure(),
- $cookie->isHttpOnly()
- );
- }
- $headers['Set-Cookie'] = $cookies;
- }
-
- // this is needed to support StreamedResponse
- ob_start();
- $response->sendContent();
- $content = ob_get_clean();
-
- return new Response($content, $response->getStatusCode(), $headers);
- }
-
- throw new DriverException(sprintf(
- 'The BrowserKit client returned an unsupported response implementation: %s. Please upgrade your BrowserKit package to 2.3 or newer.',
- get_class($response)
- ));
- }
-
- /**
* Prepares URL for visiting.
* Removes "*.php/" from urls and then passes it to BrowserKitDriver::visit().
*
@@ -810,11 +716,11 @@ class BrowserKitDriver extends CoreDriver
{
$type = $node->hasAttribute('type') ? $node->getAttribute('type') : null;
- if ('input' == $node->nodeName && in_array($type, array('submit', 'image'))) {
+ if ('input' === $node->nodeName && in_array($type, array('submit', 'image'), true)) {
return true;
}
- return 'button' == $node->nodeName && (null === $type || 'submit' == $type);
+ return 'button' === $node->nodeName && (null === $type || 'submit' === $type);
}
/**
@@ -828,7 +734,7 @@ class BrowserKitDriver extends CoreDriver
{
$type = $node->hasAttribute('type') ? $node->getAttribute('type') : null;
- return in_array($node->nodeName, array('input', 'button')) && 'reset' == $type;
+ return in_array($node->nodeName, array('input', 'button'), true) && 'reset' === $type;
}
/**
@@ -881,10 +787,10 @@ class BrowserKitDriver extends CoreDriver
$nodeReflection->setAccessible(true);
$valueReflection->setAccessible(true);
- if (!($field instanceof InputFormField && in_array(
- $nodeReflection->getValue($field)->getAttribute('type'),
- array('submit', 'button', 'image')
- ))) {
+ $isIgnoredField = $field instanceof InputFormField &&
+ in_array($nodeReflection->getValue($field)->getAttribute('type'), array('submit', 'button', 'image'), true);
+
+ if (!$isIgnoredField) {
$valueReflection->setValue($to[$name], $valueReflection->getValue($field));
}
}
diff --git a/vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php b/vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php
index 32335c5..9e2643c 100644
--- a/vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php
+++ b/vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php
@@ -127,7 +127,7 @@ HTML;
/**
* @expectedException \Behat\Mink\Exception\DriverException
- * @expectedExceptionMessage Behat\Mink\Driver\BrowserKitDriver supports clicking on links and buttons only. But "div" provided
+ * @expectedExceptionMessage Behat\Mink\Driver\BrowserKitDriver supports clicking on links and submit or reset buttons only. But "div" provided
*/
public function testClickOnUnsupportedElement()
{
diff --git a/vendor/behat/mink-goutte-driver/.travis.yml b/vendor/behat/mink-goutte-driver/.travis.yml
index d21d960..5b86531 100644
--- a/vendor/behat/mink-goutte-driver/.travis.yml
+++ b/vendor/behat/mink-goutte-driver/.travis.yml
@@ -1,23 +1,27 @@
language: php
+sudo: false
+
+cache:
+ directories:
+ - $HOME/.composer/cache/files
+
php: [5.3, 5.4, 5.5, 5.6, hhvm]
before_install:
# Force using Goutte 2 on HHVM for now because Guzzle 6 is broken there
- if [ "hhvm" = "$TRAVIS_PHP_VERSION" ]; then composer require fabpot/goutte '~2' --no-update; fi
-before_script:
- - export WEB_FIXTURES_HOST=http://localhost
+install:
+ - composer install
- - composer install --dev --prefer-source
+before_script:
+ - export WEB_FIXTURES_HOST=http://localhost:8000
- - sudo apt-get update
- - sudo apt-get install -y --force-yes apache2 libapache2-mod-php5
- - sudo sed -i -e "s,/var/www,$(pwd)/vendor/behat/mink/driver-testsuite/web-fixtures,g" /etc/apache2/sites-available/default
- - sudo /etc/init.d/apache2 restart
+ # Start a webserver for web fixtures. Force using PHP 5.6 to be able to run it on PHP 5.3 and HHVM jobs too
+ - ~/.phpenv/versions/5.6/bin/php -S localhost:8000 -t vendor/behat/mink/driver-testsuite/web-fixtures > /dev/null 2>&1 &
script: phpunit -v --coverage-clover=coverage.clover
after_script:
- - wget https://scrutinizer-ci.com/ocular.phar
- - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
+ - wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
diff --git a/vendor/behat/mink-goutte-driver/CHANGELOG.md b/vendor/behat/mink-goutte-driver/CHANGELOG.md
index fcaa7f0..581eb5e 100644
--- a/vendor/behat/mink-goutte-driver/CHANGELOG.md
+++ b/vendor/behat/mink-goutte-driver/CHANGELOG.md
@@ -1,3 +1,14 @@
+1.2.0 / 2015-09-21
+==================
+
+New features:
+
+* Added support for Goutte 3.1+
+
+Misc:
+
+* Updated the repository structure to PSR-4
+
1.1.0 / 2014-10-09
==================
diff --git a/vendor/behat/mink-goutte-driver/composer.json b/vendor/behat/mink-goutte-driver/composer.json
index f103906..80d6ecf 100644
--- a/vendor/behat/mink-goutte-driver/composer.json
+++ b/vendor/behat/mink-goutte-driver/composer.json
@@ -21,6 +21,10 @@
"fabpot/goutte": "~1.0.4|~2.0|~3.1"
},
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
+ },
+
"autoload": {
"psr-4": {
"Behat\\Mink\\Driver\\": "src/"
@@ -35,7 +39,7 @@
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "1.2.x-dev"
}
}
}
diff --git a/vendor/behat/mink/.travis.yml b/vendor/behat/mink/.travis.yml
index 4c0c786..677ee0e 100644
--- a/vendor/behat/mink/.travis.yml
+++ b/vendor/behat/mink/.travis.yml
@@ -2,16 +2,27 @@ language: php
sudo: false
-php: [5.3, 5.4, 5.5, 5.6, hhvm]
+php: [5.3, 5.4, 5.5, 5.6, 7.0, hhvm]
+
+matrix:
+ fast_finish: true
+ include:
+ - php: 5.3
+ env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' SYMFONY_DEPRECATIONS_HELPER=weak
+ allow_failures:
+ - php: 7.0
cache:
directories:
- - $HOME/.composer/cache
+ - $HOME/.composer/cache/files
+
+before_install:
+ - composer self-update
install:
- - composer install
+ - composer update $COMPOSER_FLAGS
script: phpunit -v --coverage-clover=coverage.clover
after_script:
- - wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
+ - if [[ "7.0" != "$TRAVIS_PHP_VERSION" && "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
diff --git a/vendor/behat/mink/CHANGES.md b/vendor/behat/mink/CHANGES.md
index e21d5af..4ef4ecb 100644
--- a/vendor/behat/mink/CHANGES.md
+++ b/vendor/behat/mink/CHANGES.md
@@ -1,3 +1,45 @@
+1.7.0 / 2015-09-20
+==================
+
+New features:
+
+* Added `Session::getResponseHeader` to access a response header easily
+* Added support for header assertions
+* Added a forward compatibility layer for drivers to allow them to prepare
+ for Mink 2.0 (they won't require any change if they use it). They should
+ now overwrite `CoreDriver::findElementXpaths` instead of implementing `find`
+ and `setSession` themselves.
+* Added escaping of the locator in the NamedSelector rather than expecting
+ the caller to perform the escaping. Passing an escaped locator is still
+ supported but deprecated.
+* Remove the dependency on the Session in expectation exceptions. Passing
+ the session in the exception constructor is now deprecated. The driver
+ should be passed instead.
+
+Bug fixes:
+
+* Fixed the URL assertions when comparing paths ending in ``.php``
+* Silenced deprecation warnings (following the Symfony convention) to make
+ them less invasive. Use the `symfony/phpunit-bridge` to get them reported
+ when using Mink in your PHPUnit tests.
+* Fixed `NodeElement::hasClass` in case the class attribute contains newlines
+
+Testsuite:
+
+* Made the testsuite compatible with PHPUnit strict timing mode (only the library testsuite, not the driver one)
+* Added testing against PHP 7
+* Added testing against lowest version of dependencies to ensure we got the lower bounds right
+
+Driver testsuite:
+
+* Added an extra test to ensure the right behavior when getting the HTML with empty elements
+* Added a few more safeguards to ensure test failures rather than fatal errors for misbehaving drivers
+* Added a test ensuring that drivers follow recommended practices
+
+Misc:
+
+* Added a few missing deprecation warnings for deprecated APIs or classes.
+
1.6.1 / 2015-02-04
==================
diff --git a/vendor/behat/mink/LICENSE b/vendor/behat/mink/LICENSE
index 14f15e8..854754b 100644
--- a/vendor/behat/mink/LICENSE
+++ b/vendor/behat/mink/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2013 Konstantin Kudryashov <ever.zet@gmail.com>
+Copyright (c) 2011-2015 Konstantin Kudryashov <ever.zet@gmail.com>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff --git a/vendor/behat/mink/composer.json b/vendor/behat/mink/composer.json
index 7a8723f..0193f43 100644
--- a/vendor/behat/mink/composer.json
+++ b/vendor/behat/mink/composer.json
@@ -16,7 +16,11 @@
"require": {
"php": ">=5.3.1",
- "symfony/css-selector": "~2.0"
+ "symfony/css-selector": "~2.1"
+ },
+
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
},
"suggest": {
@@ -40,7 +44,7 @@
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.7.x-dev"
}
}
}
diff --git a/vendor/behat/mink/driver-testsuite/tests/AbstractConfig.php b/vendor/behat/mink/driver-testsuite/tests/AbstractConfig.php
index f654297..057e6fd 100644
--- a/vendor/behat/mink/driver-testsuite/tests/AbstractConfig.php
+++ b/vendor/behat/mink/driver-testsuite/tests/AbstractConfig.php
@@ -33,7 +33,7 @@ abstract class AbstractConfig
}
/**
- * Gets the base url to the fixture folder
+ * Gets the base url to the fixture folder.
*
* @return string
*/
diff --git a/vendor/behat/mink/driver-testsuite/tests/Basic/BestPracticesTest.php b/vendor/behat/mink/driver-testsuite/tests/Basic/BestPracticesTest.php
new file mode 100644
index 0000000..d6cda7d
--- /dev/null
+++ b/vendor/behat/mink/driver-testsuite/tests/Basic/BestPracticesTest.php
@@ -0,0 +1,84 @@
+<?php
+
+namespace Behat\Mink\Tests\Driver\Basic;
+
+use Behat\Mink\Tests\Driver\TestCase;
+
+/**
+ * This testcase ensures that the driver implementation follows recommended practices for drivers.
+ */
+class BestPracticesTest extends TestCase
+{
+ public function testExtendsCoreDriver()
+ {
+ $driver = $this->createDriver();
+
+ $this->assertInstanceOf('Behat\Mink\Driver\CoreDriver', $driver);
+
+ return $driver;
+ }
+
+ /**
+ * @depends testExtendsCoreDriver
+ */
+ public function testImplementFindXpath()
+ {
+ $driver = $this->createDriver();
+
+ $this->assertNotImplementMethod('find', $driver, 'The driver should overwrite `findElementXpaths` rather than `find` for forward compatibility with Mink 2.');
+ $this->assertImplementMethod('findElementXpaths', $driver, 'The driver must be able to find elements.');
+ $this->assertNotImplementMethod('setSession', $driver, 'The driver should not deal with the Session directly for forward compatibility with Mink 2.');
+ }
+
+ /**
+ * @dataProvider provideRequiredMethods
+ */
+ public function testImplementBasicApi($method)
+ {
+ $driver = $this->createDriver();
+
+ $this->assertImplementMethod($method, $driver, 'The driver is unusable when this method is not implemented.');
+ }
+
+ public function provideRequiredMethods()
+ {
+ return array(
+ array('start'),
+ array('isStarted'),
+ array('stop'),
+ array('reset'),
+ array('visit'),
+ array('getCurrentUrl'),
+ array('getContent'),
+ array('click'),
+ );
+ }
+
+ private function assertImplementMethod($method, $object, $reason = '')
+ {
+ $ref = new \ReflectionClass(get_class($object));
+ $refMethod = $ref->getMethod($method);
+
+ $message = sprintf('The driver should implement the `%s` method.', $method);
+
+ if ('' !== $reason) {
+ $message .= ' '.$reason;
+ }
+
+ $this->assertSame($ref->name, $refMethod->getDeclaringClass()->name, $message);
+ }
+
+ private function assertNotImplementMethod($method, $object, $reason = '')
+ {
+ $ref = new \ReflectionClass(get_class($object));
+ $refMethod = $ref->getMethod($method);
+
+ $message = sprintf('The driver should not implement the `%s` method.', $method);
+
+ if ('' !== $reason) {
+ $message .= ' '.$reason;
+ }
+
+ $this->assertNotSame($ref->name, $refMethod->getDeclaringClass()->name, $message);
+ }
+}
diff --git a/vendor/behat/mink/driver-testsuite/tests/Basic/ContentTest.php b/vendor/behat/mink/driver-testsuite/tests/Basic/ContentTest.php
index 6f516e8..fdd0ffa 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Basic/ContentTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Basic/ContentTest.php
@@ -21,6 +21,18 @@ class ContentTest extends TestCase
);
}
+ public function testDumpingEmptyElements()
+ {
+ $this->getSession()->visit($this->pathTo('/index.html'));
+
+ $element = $this->getAssertSession()->elementExists('css', '#empty');
+
+ $this->assertEquals(
+ 'An empty <em></em> tag should be rendered with both open and close tags.',
+ trim($element->getHtml())
+ );
+ }
+
/**
* @dataProvider getAttributeDataProvider
*/
diff --git a/vendor/behat/mink/driver-testsuite/tests/Basic/CookieTest.php b/vendor/behat/mink/driver-testsuite/tests/Basic/CookieTest.php
index 355dd71..5636c11 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Basic/CookieTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Basic/CookieTest.php
@@ -7,7 +7,8 @@ use Behat\Mink\Tests\Driver\TestCase;
class CookieTest extends TestCase
{
/**
- * test cookie decoding
+ * test cookie decoding.
+ *
* @group issue140
*/
public function testIssue140()
diff --git a/vendor/behat/mink/driver-testsuite/tests/Basic/ErrorHandlingTest.php b/vendor/behat/mink/driver-testsuite/tests/Basic/ErrorHandlingTest.php
index 440585a..bb4bb2d 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Basic/ErrorHandlingTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Basic/ErrorHandlingTest.php
@@ -4,6 +4,9 @@ namespace Behat\Mink\Tests\Driver\Basic;
use Behat\Mink\Tests\Driver\TestCase;
+/**
+ * @group slow
+ */
class ErrorHandlingTest extends TestCase
{
const NOT_FOUND_XPATH = '//html/./invalid';
diff --git a/vendor/behat/mink/driver-testsuite/tests/Basic/HeaderTest.php b/vendor/behat/mink/driver-testsuite/tests/Basic/HeaderTest.php
index 0288ff1..072ceb4 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Basic/HeaderTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Basic/HeaderTest.php
@@ -7,7 +7,8 @@ use Behat\Mink\Tests\Driver\TestCase;
class HeaderTest extends TestCase
{
/**
- * test referrer
+ * test referrer.
+ *
* @group issue130
*/
public function testIssue130()
diff --git a/vendor/behat/mink/driver-testsuite/tests/Basic/NavigationTest.php b/vendor/behat/mink/driver-testsuite/tests/Basic/NavigationTest.php
index 8ecb139..7056316 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Basic/NavigationTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Basic/NavigationTest.php
@@ -12,13 +12,13 @@ class NavigationTest extends TestCase
$this->assertEquals($this->pathTo('/redirect_destination.html'), $this->getSession()->getCurrentUrl());
}
- public function testPageControlls()
+ public function testPageControls()
{
$this->getSession()->visit($this->pathTo('/randomizer.php'));
- $number1 = $this->getSession()->getPage()->find('css', '#number')->getText();
+ $number1 = $this->getAssertSession()->elementExists('css', '#number')->getText();
$this->getSession()->reload();
- $number2 = $this->getSession()->getPage()->find('css', '#number')->getText();
+ $number2 = $this->getAssertSession()->elementExists('css', '#number')->getText();
$this->assertNotEquals($number1, $number2);
@@ -58,7 +58,7 @@ class NavigationTest extends TestCase
$this->getSession()->visit($this->pathTo('/links.html'));
$page = $this->getSession()->getPage();
- $link = $page->findLink("Link with a ");
+ $link = $page->findLink('Link with a ');
$this->assertNotNull($link);
$this->assertRegExp('/links\.html\?quoted$/', $link->getAttribute('href'));
diff --git a/vendor/behat/mink/driver-testsuite/tests/Basic/TraversingTest.php b/vendor/behat/mink/driver-testsuite/tests/Basic/TraversingTest.php
index 3bcb7ac..6f1ebcb 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Basic/TraversingTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Basic/TraversingTest.php
@@ -7,7 +7,8 @@ use Behat\Mink\Tests\Driver\TestCase;
class TraversingTest extends TestCase
{
/**
- * find by label
+ * find by label.
+ *
* @group issue211
*/
public function testIssue211()
@@ -24,20 +25,23 @@ class TraversingTest extends TestCase
$page = $this->getSession()->getPage();
- $this->assertNotNull($page->find('css', 'h1'));
- $this->assertEquals('Extremely useless page', $page->find('css', 'h1')->getText());
- $this->assertEquals('h1', $page->find('css', 'h1')->getTagName());
+ $title = $page->find('css', 'h1');
+ $this->assertNotNull($title);
+ $this->assertEquals('Extremely useless page', $title->getText());
+ $this->assertEquals('h1', $title->getTagName());
- $this->assertNotNull($page->find('xpath', '//div/strong[3]'));
- $this->assertEquals('pariatur', $page->find('xpath', '//div/strong[3]')->getText());
- $this->assertEquals('super-duper', $page->find('xpath', '//div/strong[3]')->getAttribute('class'));
- $this->assertTrue($page->find('xpath', '//div/strong[3]')->hasAttribute('class'));
+ $strong = $page->find('xpath', '//div/strong[3]');
+ $this->assertNotNull($strong);
+ $this->assertEquals('pariatur', $strong->getText());
+ $this->assertEquals('super-duper', $strong->getAttribute('class'));
+ $this->assertTrue($strong->hasAttribute('class'));
- $this->assertNotNull($page->find('xpath', '//div/strong[2]'));
- $this->assertEquals('veniam', $page->find('xpath', '//div/strong[2]')->getText());
- $this->assertEquals('strong', $page->find('xpath', '//div/strong[2]')->getTagName());
- $this->assertNull($page->find('xpath', '//div/strong[2]')->getAttribute('class'));
- $this->assertFalse($page->find('xpath', '//div/strong[2]')->hasAttribute('class'));
+ $strong2 = $page->find('xpath', '//div/strong[2]');
+ $this->assertNotNull($strong2);
+ $this->assertEquals('veniam', $strong2->getText());
+ $this->assertEquals('strong', $strong2->getTagName());
+ $this->assertNull($strong2->getAttribute('class'));
+ $this->assertFalse($strong2->hasAttribute('class'));
$strongs = $page->findAll('css', 'div#core > strong');
$this->assertCount(3, $strongs);
@@ -46,6 +50,7 @@ class TraversingTest extends TestCase
$element = $page->find('css', '#some-element');
+ $this->assertNotNull($element);
$this->assertEquals('some very interesting text', $element->getText());
$this->assertEquals(
"\n some <div>very\n </div>\n".
@@ -105,12 +110,11 @@ class TraversingTest extends TestCase
{
$this->getSession()->visit($this->pathTo('/index.html'));
- $traversDiv = $this->getSession()->getPage()->findAll('css', 'div.travers');
+ $traversDivs = $this->getSession()->getPage()->findAll('css', 'div.travers');
- $this->assertCount(1, $traversDiv);
- $traversDiv = $traversDiv[0];
+ $this->assertCount(1, $traversDivs);
- $subDivs = $traversDiv->findAll('css', 'div.sub');
+ $subDivs = $traversDivs[0]->findAll('css', 'div.sub');
$this->assertCount(3, $subDivs);
$this->assertTrue($subDivs[2]->hasLink('some deep url'));
diff --git a/vendor/behat/mink/driver-testsuite/tests/Basic/VisibilityTest.php b/vendor/behat/mink/driver-testsuite/tests/Basic/VisibilityTest.php
index b3daf31..bb5634e 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Basic/VisibilityTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Basic/VisibilityTest.php
@@ -11,7 +11,7 @@ class VisibilityTest extends TestCase
$this->getSession()->visit($this->pathTo('/js_test.html'));
$webAssert = $this->getAssertSession();
- $clicker = $webAssert->elementExists('css', '.elements div#clicker');
+ $clicker = $webAssert->elementExists('css', '.elements div#clicker');
$invisible = $webAssert->elementExists('css', '#invisible');
$this->assertFalse($invisible->isVisible());
diff --git a/vendor/behat/mink/driver-testsuite/tests/Form/CheckboxTest.php b/vendor/behat/mink/driver-testsuite/tests/Form/CheckboxTest.php
index e1ce4ab..18c4088 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Form/CheckboxTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Form/CheckboxTest.php
@@ -53,8 +53,8 @@ class CheckboxTest extends TestCase
$this->assertEquals('Multicheckbox Test', $webAssert->elementExists('css', 'h1')->getText());
- $updateMail = $webAssert->elementExists('css', '[name="mail_types[]"][value="update"]');
- $spamMail = $webAssert->elementExists('css', '[name="mail_types[]"][value="spam"]');
+ $updateMail = $webAssert->elementExists('css', '[name="mail_types[]"][value="update"]');
+ $spamMail = $webAssert->elementExists('css', '[name="mail_types[]"][value="spam"]');
$this->assertEquals('update', $updateMail->getValue());
$this->assertNull($spamMail->getValue());
diff --git a/vendor/behat/mink/driver-testsuite/tests/Form/GeneralTest.php b/vendor/behat/mink/driver-testsuite/tests/Form/GeneralTest.php
index f15f266..0e08d34 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Form/GeneralTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Form/GeneralTest.php
@@ -25,8 +25,8 @@ class GeneralTest extends TestCase
$page = $this->getSession()->getPage();
$this->assertEquals('Basic Form Page', $webAssert->elementExists('css', 'h1')->getText());
- $firstname = $webAssert->fieldExists('first_name');
- $lastname = $webAssert->fieldExists('lastn');
+ $firstname = $webAssert->fieldExists('first_name');
+ $lastname = $webAssert->fieldExists('lastn');
$this->assertEquals('Firstname', $firstname->getValue());
$this->assertEquals('Lastname', $lastname->getValue());
@@ -150,15 +150,15 @@ class GeneralTest extends TestCase
$page = $this->getSession()->getPage();
$this->assertEquals('ADvanced Form Page', $webAssert->elementExists('css', 'h1')->getText());
- $firstname = $webAssert->fieldExists('first_name');
- $lastname = $webAssert->fieldExists('lastn');
- $email = $webAssert->fieldExists('Your email:');
- $select = $webAssert->fieldExists('select_number');
- $sex = $webAssert->fieldExists('sex');
- $maillist = $webAssert->fieldExists('mail_list');
- $agreement = $webAssert->fieldExists('agreement');
- $notes = $webAssert->fieldExists('notes');
- $about = $webAssert->fieldExists('about');
+ $firstname = $webAssert->fieldExists('first_name');
+ $lastname = $webAssert->fieldExists('lastn');
+ $email = $webAssert->fieldExists('Your email:');
+ $select = $webAssert->fieldExists('select_number');
+ $sex = $webAssert->fieldExists('sex');
+ $maillist = $webAssert->fieldExists('mail_list');
+ $agreement = $webAssert->fieldExists('agreement');
+ $notes = $webAssert->fieldExists('notes');
+ $about = $webAssert->fieldExists('about');
$this->assertEquals('Firstname', $firstname->getValue());
$this->assertEquals('Lastname', $lastname->getValue());
diff --git a/vendor/behat/mink/driver-testsuite/tests/Form/SelectTest.php b/vendor/behat/mink/driver-testsuite/tests/Form/SelectTest.php
index 492625a..f06d5f0 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Form/SelectTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Form/SelectTest.php
@@ -13,7 +13,7 @@ class SelectTest extends TestCase
$page = $this->getSession()->getPage();
$this->assertEquals('Multiselect Test', $webAssert->elementExists('css', 'h1')->getText());
- $select = $webAssert->fieldExists('select_number');
+ $select = $webAssert->fieldExists('select_number');
$multiSelect = $webAssert->fieldExists('select_multiple_numbers[]');
$secondMultiSelect = $webAssert->fieldExists('select_multiple_values[]');
@@ -66,8 +66,7 @@ OUT;
$session->visit($this->pathTo('/multiselect_form.html'));
$select = $webAssert->fieldExists($selectName);
- $optionValueEscaped = $session->getSelectorsHandler()->xpathLiteral($optionValue);
- $option = $webAssert->elementExists('named', array('option', $optionValueEscaped));
+ $option = $webAssert->elementExists('named', array('option', $optionValue));
$this->assertFalse($option->isSelected());
$select->selectOption($optionText);
diff --git a/vendor/behat/mink/driver-testsuite/tests/Js/ChangeEventTest.php b/vendor/behat/mink/driver-testsuite/tests/Js/ChangeEventTest.php
index d1fd3f1..4c8a30f 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Js/ChangeEventTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Js/ChangeEventTest.php
@@ -4,10 +4,13 @@ namespace Behat\Mink\Tests\Driver\Js;
use Behat\Mink\Tests\Driver\TestCase;
+/**
+ * @group slow
+ */
class ChangeEventTest extends TestCase
{
/**
- * 'change' event should be fired after selecting an <option> in a <select>
+ * 'change' event should be fired after selecting an <option> in a <select>.
*
* TODO check whether this test is redundant with other change event tests.
*/
@@ -19,7 +22,7 @@ class ChangeEventTest extends TestCase
$session->getPage()->selectFieldOption('foo_select', 'Option 3');
$session->wait(2000, '$("#output_foo_select").text() != ""');
- $this->assertEquals('onChangeSelect', $session->getPage()->find('css', '#output_foo_select')->getText());
+ $this->assertEquals('onChangeSelect', $this->getAssertSession()->elementExists('css', '#output_foo_select')->getText());
}
public function testIssue178()
diff --git a/vendor/behat/mink/driver-testsuite/tests/Js/EventsTest.php b/vendor/behat/mink/driver-testsuite/tests/Js/EventsTest.php
index e49d837..f06999b 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Js/EventsTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Js/EventsTest.php
@@ -96,7 +96,7 @@ class EventsTest extends TestCase
$input1 = $webAssert->elementExists('css', '.elements input.input.first');
$input2 = $webAssert->elementExists('css', '.elements input.input.second');
$input3 = $webAssert->elementExists('css', '.elements input.input.third');
- $event = $webAssert->elementExists('css', '.elements .text-event');
+ $event = $webAssert->elementExists('css', '.elements .text-event');
$input1->keyDown('u', $modifier);
$this->assertEquals('key downed:'.$eventProperties, $event->getText());
diff --git a/vendor/behat/mink/driver-testsuite/tests/Js/JavascriptEvaluationTest.php b/vendor/behat/mink/driver-testsuite/tests/Js/JavascriptEvaluationTest.php
index 00235d1..ab6ab27 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Js/JavascriptEvaluationTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Js/JavascriptEvaluationTest.php
@@ -25,11 +25,11 @@ class JavascriptEvaluationTest extends TestCase
$waitable->click();
$this->getSession()->wait(3000, '$("#waitable").has("div").length > 0');
- $this->assertEquals('arrived', $this->getSession()->getPage()->find('css', '#waitable > div')->getText());
+ $this->assertEquals('arrived', $this->getAssertSession()->elementExists('css', '#waitable > div')->getText());
$waitable->click();
$this->getSession()->wait(3000, 'false');
- $this->assertEquals('timeout', $this->getSession()->getPage()->find('css', '#waitable > div')->getText());
+ $this->assertEquals('timeout', $this->getAssertSession()->elementExists('css', '#waitable > div')->getText());
}
/**
diff --git a/vendor/behat/mink/driver-testsuite/tests/Js/JavascriptTest.php b/vendor/behat/mink/driver-testsuite/tests/Js/JavascriptTest.php
index 86cfa65..ea6d77a 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Js/JavascriptTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Js/JavascriptTest.php
@@ -27,7 +27,7 @@ class JavascriptTest extends TestCase
$droppable = $webAssert->elementExists('css', '#droppable');
$draggable->dragTo($droppable);
- $this->assertEquals('Dropped!', $droppable->find('css', 'p')->getText());
+ $this->assertEquals('Dropped!', $this->getAssertSession()->elementExists('css', 'p', $droppable)->getText());
}
// test accentuated char in button
diff --git a/vendor/behat/mink/driver-testsuite/tests/Js/WindowTest.php b/vendor/behat/mink/driver-testsuite/tests/Js/WindowTest.php
index 70b9ed9..ca49491 100644
--- a/vendor/behat/mink/driver-testsuite/tests/Js/WindowTest.php
+++ b/vendor/behat/mink/driver-testsuite/tests/Js/WindowTest.php
@@ -10,7 +10,7 @@ class WindowTest extends TestCase
{
$this->getSession()->visit($this->pathTo('/window.html'));
$session = $this->getSession();
- $page = $session->getPage();
+ $page = $session->getPage();
$webAssert = $this->getAssertSession();
$page->clickLink('Popup #1');
@@ -39,7 +39,7 @@ class WindowTest extends TestCase
{
$this->getSession()->visit($this->pathTo('/window.html'));
$session = $this->getSession();
- $page = $session->getPage();
+ $page = $session->getPage();
$windowName = $this->getSession()->getWindowName();
@@ -63,7 +63,7 @@ class WindowTest extends TestCase
$session->resizeWindow(400, 300);
$session->wait(1000, 'false');
- $script = "return Math.abs(window.outerHeight - 300) <= 100 && Math.abs(window.outerWidth - 400) <= 100;";
+ $script = 'return Math.abs(window.outerHeight - 300) <= 100 && Math.abs(window.outerWidth - 400) <= 100;';
$this->assertTrue($session->evaluateScript($script));
}
@@ -76,7 +76,7 @@ class WindowTest extends TestCase
$session->maximizeWindow();
$session->wait(1000, 'false');
- $script = "return Math.abs(screen.availHeight - window.outerHeight) <= 100;";
+ $script = 'return Math.abs(screen.availHeight - window.outerHeight) <= 100;';
$this->assertTrue($session->evaluateScript($script));
}
diff --git a/vendor/behat/mink/driver-testsuite/tests/TestCase.php b/vendor/behat/mink/driver-testsuite/tests/TestCase.php
index ea003ce..964a71f 100644
--- a/vendor/behat/mink/driver-testsuite/tests/TestCase.php
+++ b/vendor/behat/mink/driver-testsuite/tests/TestCase.php
@@ -22,7 +22,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
private static $config;
/**
- * Initializes the test case
+ * Initializes the test case.
*/
public static function setUpBeforeClass()
{
@@ -102,12 +102,23 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
*/
protected function findById($id)
{
- $id = $this->getSession()->getSelectorsHandler()->xpathLiteral($id);
-
return $this->getAssertSession()->elementExists('named', array('id', $id));
}
/**
+ * Creates a new driver instance.
+ *
+ * This driver is not associated to a session. It is meant to be used for tests on the driver
+ * implementation itself rather than test using the Mink API.
+ *
+ * @return \Behat\Mink\Driver\DriverInterface
+ */
+ protected function createDriver()
+ {
+ return self::getConfig()->createDriver();
+ }
+
+ /**
* Map remote file path.
*
* @param string $file File path.
@@ -136,7 +147,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
}
/**
- * Waits for a condition to be true, considering than it is successful for drivers not supporting wait()
+ * Waits for a condition to be true, considering than it is successful for drivers not supporting wait().
*
* @param int $time
* @param string $condition A JS condition to evaluate
diff --git a/vendor/behat/mink/driver-testsuite/web-fixtures/element_change_detector.html b/vendor/behat/mink/driver-testsuite/web-fixtures/element_change_detector.html
index af3032a..c309bae 100644
--- a/vendor/behat/mink/driver-testsuite/web-fixtures/element_change_detector.html
+++ b/vendor/behat/mink/driver-testsuite/web-fixtures/element_change_detector.html
@@ -41,7 +41,7 @@
var $change_registry = {},
$results = $('#results');
- $(':input').change(function ($e) {
+ $(':input').change(function () {
var $result_id = this.id + '-result';
if (!$change_registry[this.id]) {
diff --git a/vendor/behat/mink/driver-testsuite/web-fixtures/index.html b/vendor/behat/mink/driver-testsuite/web-fixtures/index.html
index 6bb379c..cc8c821 100644
--- a/vendor/behat/mink/driver-testsuite/web-fixtures/index.html
+++ b/vendor/behat/mink/driver-testsuite/web-fixtures/index.html
@@ -9,6 +9,10 @@
<div id="core">
<strong>Lorem</strong> ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim <strong>veniam</strong>, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla <strong class="super-duper">pariatur</strong>. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ <div id="empty">
+ An empty <em></em> tag should be rendered with both open and close tags.
+ </div>
+
<div id="some-element" data-href="http://mink.behat.org">
some <div>very
</div>
diff --git a/vendor/behat/mink/driver-testsuite/web-fixtures/issue225.html b/vendor/behat/mink/driver-testsuite/web-fixtures/issue225.html
index 2178bba..1321463 100644
--- a/vendor/behat/mink/driver-testsuite/web-fixtures/issue225.html
+++ b/vendor/behat/mink/driver-testsuite/web-fixtures/issue225.html
@@ -12,7 +12,7 @@
<div id="panel"></div>
<script type="text/javascript">
- $('#btn').click(function (event) {
+ $('#btn').click(function () {
$('#panel').text('OH ' + 'AIH!');
});
</script>
diff --git a/vendor/behat/mink/driver-testsuite/web-fixtures/js_test.html b/vendor/behat/mink/driver-testsuite/web-fixtures/js_test.html
index e965a40..6285455 100644
--- a/vendor/behat/mink/driver-testsuite/web-fixtures/js_test.html
+++ b/vendor/behat/mink/driver-testsuite/web-fixtures/js_test.html
@@ -44,23 +44,27 @@
<script src="js/jquery-ui-1.8.14.custom.min.js"></script>
<script>
$(document).ready(function() {
- $('#clicker').click(function() {
+ var $clicker = $('#clicker');
+
+ $clicker.click(function() {
$(this).text('single clicked');
});
- $('#clicker').dblclick(function() {
+ $clicker.dblclick(function() {
$(this).text('double clicked');
});
- $('#clicker').bind('contextmenu', function() {
+ $clicker.bind('contextmenu', function() {
$(this).text('right clicked');
});
- $('#focus-blur-detector').focus(function() {
+ var $focusDetector = $('#focus-blur-detector');
+
+ $focusDetector.focus(function() {
$(this).val('focused');
});
- $('#focus-blur-detector').blur(function() {
+ $focusDetector.blur(function() {
$(this).val('blured');
});
diff --git a/vendor/behat/mink/src/Driver/CoreDriver.php b/vendor/behat/mink/src/Driver/CoreDriver.php
index 248f291..9b4c04e 100644
--- a/vendor/behat/mink/src/Driver/CoreDriver.php
+++ b/vendor/behat/mink/src/Driver/CoreDriver.php
@@ -10,6 +10,7 @@
namespace Behat\Mink\Driver;
+use Behat\Mink\Element\NodeElement;
use Behat\Mink\Exception\UnsupportedDriverActionException;
use Behat\Mink\Session;
@@ -22,11 +23,16 @@ use Behat\Mink\Session;
abstract class CoreDriver implements DriverInterface
{
/**
+ * @var Session
+ */
+ private $session;
+
+ /**
* {@inheritdoc}
*/
public function setSession(Session $session)
{
- throw new UnsupportedDriverActionException('Setting the session is not supported by %s', $this);
+ $this->session = $session;
}
/**
@@ -90,6 +96,28 @@ abstract class CoreDriver implements DriverInterface
*/
public function find($xpath)
{
+ $elements = array();
+
+ foreach ($this->findElementXpaths($xpath) as $xpath) {
+ $elements[] = new NodeElement($xpath, $this->session);
+ }
+
+ return $elements;
+ }
+
+ /**
+ * Finds elements with specified XPath query.
+ *
+ * @see find()
+ *
+ * @param string $xpath
+ *
+ * @return string[] The XPath of the matched elements
+ *
+ * @throws UnsupportedDriverActionException When operation not supported by the driver
+ */
+ protected function findElementXpaths($xpath)
+ {
throw new UnsupportedDriverActionException('Finding elements is not supported by %s', $this);
}
diff --git a/vendor/behat/mink/src/Driver/DriverInterface.php b/vendor/behat/mink/src/Driver/DriverInterface.php
index 8357caa..0880960 100644
--- a/vendor/behat/mink/src/Driver/DriverInterface.php
+++ b/vendor/behat/mink/src/Driver/DriverInterface.php
@@ -140,7 +140,7 @@ interface DriverInterface
public function back();
/**
- * Sets HTTP Basic authentication parameters
+ * Sets HTTP Basic authentication parameters.
*
* @param string|Boolean $user user name or false to disable authentication
* @param string $password password
@@ -217,7 +217,7 @@ interface DriverInterface
/**
* Returns last response status code.
*
- * @return integer
+ * @return int
*
* @throws UnsupportedDriverActionException When operation not supported by the driver
* @throws DriverException When the operation cannot be done
@@ -519,9 +519,9 @@ interface DriverInterface
/**
* Presses specific keyboard key.
*
- * @param string $xpath
- * @param string|integer $char could be either char ('b') or char-code (98)
- * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
+ * @param string $xpath
+ * @param string|int $char could be either char ('b') or char-code (98)
+ * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
*
* @throws UnsupportedDriverActionException When operation not supported by the driver
* @throws DriverException When the operation cannot be done
@@ -531,9 +531,9 @@ interface DriverInterface
/**
* Pressed down specific keyboard key.
*
- * @param string $xpath
- * @param string|integer $char could be either char ('b') or char-code (98)
- * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
+ * @param string $xpath
+ * @param string|int $char could be either char ('b') or char-code (98)
+ * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
*
* @throws UnsupportedDriverActionException When operation not supported by the driver
* @throws DriverException When the operation cannot be done
@@ -543,9 +543,9 @@ interface DriverInterface
/**
* Pressed up specific keyboard key.
*
- * @param string $xpath
- * @param string|integer $char could be either char ('b') or char-code (98)
- * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
+ * @param string $xpath
+ * @param string|int $char could be either char ('b') or char-code (98)
+ * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
*
* @throws UnsupportedDriverActionException When operation not supported by the driver
* @throws DriverException When the operation cannot be done
@@ -591,10 +591,10 @@ interface DriverInterface
/**
* Waits some time or until JS condition turns true.
*
- * @param integer $timeout timeout in milliseconds
- * @param string $condition JS condition
+ * @param int $timeout timeout in milliseconds
+ * @param string $condition JS condition
*
- * @return boolean
+ * @return bool
*
* @throws UnsupportedDriverActionException When operation not supported by the driver
* @throws DriverException When the operation cannot be done
@@ -604,9 +604,9 @@ interface DriverInterface
/**
* Set the dimensions of the window.
*
- * @param integer $width set the window width, measured in pixels
- * @param integer $height set the window height, measured in pixels
- * @param string $name window name (null for the main window)
+ * @param int $width set the window width, measured in pixels
+ * @param int $height set the window height, measured in pixels
+ * @param string $name window name (null for the main window)
*
* @throws UnsupportedDriverActionException When operation not supported by the driver
* @throws DriverException When the operation cannot be done
@@ -614,7 +614,7 @@ interface DriverInterface
public function resizeWindow($width, $height, $name = null);
/**
- * Maximize the window if it is not maximized already
+ * Maximizes the window if it is not maximized already.
*
* @param string $name window name (null for the main window)
*
diff --git a/vendor/behat/mink/src/Element/DocumentElement.php b/vendor/behat/mink/src/Element/DocumentElement.php
index edde3c3..c2daf66 100644
--- a/vendor/behat/mink/src/Element/DocumentElement.php
+++ b/vendor/behat/mink/src/Element/DocumentElement.php
@@ -46,8 +46,6 @@ class DocumentElement extends TraversableElement
*/
public function hasContent($content)
{
- return $this->has('named', array(
- 'content', $this->getSelectorsHandler()->xpathLiteral($content),
- ));
+ return $this->has('named', array('content', $content));
}
}
diff --git a/vendor/behat/mink/src/Element/Element.php b/vendor/behat/mink/src/Element/Element.php
index 07e1e11..a2b6c0e 100644
--- a/vendor/behat/mink/src/Element/Element.php
+++ b/vendor/behat/mink/src/Element/Element.php
@@ -68,6 +68,8 @@ abstract class Element implements ElementInterface
*/
public function getSession()
{
+ @trigger_error(sprintf('The method %s is deprecated as of 1.6 and will be removed in 2.0', __METHOD__), E_USER_DEPRECATED);
+
return $this->session;
}
@@ -85,9 +87,13 @@ abstract class Element implements ElementInterface
* Returns selectors handler.
*
* @return SelectorsHandler
+ *
+ * @deprecated Accessing the selectors handler in the element is deprecated as of 1.7 and will be impossible in 2.0.
*/
protected function getSelectorsHandler()
{
+ @trigger_error(sprintf('The method %s is deprecated as of 1.7 and will be removed in 2.0', __METHOD__), E_USER_DEPRECATED);
+
return $this->selectorsHandler;
}
@@ -156,7 +162,7 @@ abstract class Element implements ElementInterface
return $items;
}
- $xpath = $this->getSelectorsHandler()->selectorToXpath($selector, $locator);
+ $xpath = $this->selectorsHandler->selectorToXpath($selector, $locator);
$xpath = $this->xpathManipulator->prepend($xpath, $this->getXpath());
return $this->getDriver()->find($xpath);
@@ -189,19 +195,20 @@ abstract class Element implements ElementInterface
}
/**
- * Builds an ElementNotFoundException
- *
- * This is an helper to build the ElementNotFoundException without
- * needing to use the deprecated getSession accessor in child classes.
+ * Builds an ElementNotFoundException.
*
* @param string $type
* @param string|null $selector
* @param string|null $locator
*
* @return ElementNotFoundException
+ *
+ * @deprecated as of 1.7, to be removed in 2.0
*/
protected function elementNotFound($type, $selector = null, $locator = null)
{
- return new ElementNotFoundException($this->session, $type, $selector, $locator);
+ @trigger_error(sprintf('The method %s is deprecated as of 1.7 and will be removed in 2.0', __METHOD__), E_USER_DEPRECATED);
+
+ return new ElementNotFoundException($this->driver, $type, $selector, $locator);
}
}
diff --git a/vendor/behat/mink/src/Element/ElementInterface.php b/vendor/behat/mink/src/Element/ElementInterface.php
index 8c134b9..1d9cc4f 100644
--- a/vendor/behat/mink/src/Element/ElementInterface.php
+++ b/vendor/behat/mink/src/Element/ElementInterface.php
@@ -50,7 +50,7 @@ interface ElementInterface
/**
* Checks if an element still exists in the DOM.
*
- * @return boolean
+ * @return bool
*/
public function isValid();
@@ -62,6 +62,7 @@ interface ElementInterface
* Will receive reference to `this element` as first argument.
*
* @return mixed
+ *
* @throws \InvalidArgumentException When invalid callback given.
*/
public function waitFor($timeout, $callback);
diff --git a/vendor/behat/mink/src/Element/NodeElement.php b/vendor/behat/mink/src/Element/NodeElement.php
index 8e43546..bbb8573 100644
--- a/vendor/behat/mink/src/Element/NodeElement.php
+++ b/vendor/behat/mink/src/Element/NodeElement.php
@@ -130,16 +130,16 @@ class NodeElement extends TraversableElement
}
/**
- * Checks whether an element has a named CSS class
+ * Checks whether an element has a named CSS class.
*
* @param string $className Name of the class
*
- * @return boolean
+ * @return bool
*/
public function hasClass($className)
{
if ($this->hasAttribute('class')) {
- return in_array($className, explode(' ', $this->getAttribute('class')));
+ return in_array($className, preg_split('/\s+/', $this->getAttribute('class')));
}
return false;
@@ -206,7 +206,7 @@ class NodeElement extends TraversableElement
}
/**
- * Selects specified option for select field or specified radio button in the group
+ * Selects specified option for select field or specified radio button in the group.
*
* If the current node is a select box, this selects the option found by its value or
* its text.
@@ -228,12 +228,10 @@ class NodeElement extends TraversableElement
return;
}
- $opt = $this->find('named', array(
- 'option', $this->getSelectorsHandler()->xpathLiteral($option),
- ));
+ $opt = $this->find('named', array('option', $option));
if (null === $opt) {
- throw $this->elementNotFound('select option', 'value|text', $option);
+ throw new ElementNotFoundException($this->getDriver(), 'select option', 'value|text', $option);
}
$this->getDriver()->selectOption($this->getXpath(), $opt->getValue(), $multiple);
@@ -310,8 +308,8 @@ class NodeElement extends TraversableElement
/**
* Presses specific keyboard key.
*
- * @param string|integer $char could be either char ('b') or char-code (98)
- * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
+ * @param string|int $char could be either char ('b') or char-code (98)
+ * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
*/
public function keyPress($char, $modifier = null)
{
@@ -321,8 +319,8 @@ class NodeElement extends TraversableElement
/**
* Pressed down specific keyboard key.
*
- * @param string|integer $char could be either char ('b') or char-code (98)
- * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
+ * @param string|int $char could be either char ('b') or char-code (98)
+ * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
*/
public function keyDown($char, $modifier = null)
{
@@ -332,8 +330,8 @@ class NodeElement extends TraversableElement
/**
* Pressed up specific keyboard key.
*
- * @param string|integer $char could be either char ('b') or char-code (98)
- * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
+ * @param string|int $char could be either char ('b') or char-code (98)
+ * @param string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')
*/
public function keyUp($char, $modifier = null)
{
diff --git a/vendor/behat/mink/src/Element/TraversableElement.php b/vendor/behat/mink/src/Element/TraversableElement.php
index 0621af3..a5e05b9 100644
--- a/vendor/behat/mink/src/Element/TraversableElement.php
+++ b/vendor/behat/mink/src/Element/TraversableElement.php
@@ -28,8 +28,6 @@ abstract class TraversableElement extends Element
*/
public function findById($id)
{
- $id = $this->getSelectorsHandler()->xpathLiteral($id);
-
return $this->find('named', array('id', $id));
}
@@ -54,9 +52,7 @@ abstract class TraversableElement extends Element
*/
public function findLink($locator)
{
- return $this->find('named', array(
- 'link', $this->getSelectorsHandler()->xpathLiteral($locator),
- ));
+ return $this->find('named', array('link', $locator));
}
/**
@@ -71,7 +67,7 @@ abstract class TraversableElement extends Element
$link = $this->findLink($locator);
if (null === $link) {
- throw $this->elementNotFound('link', 'id|title|alt|text', $locator);
+ throw new ElementNotFoundException($this->getDriver(), 'link', 'id|title|alt|text', $locator);
}
$link->click();
@@ -98,9 +94,7 @@ abstract class TraversableElement extends Element
*/
public function findButton($locator)
{
- return $this->find('named', array(
- 'button', $this->getSelectorsHandler()->xpathLiteral($locator),
- ));
+ return $this->find('named', array('button', $locator));
}
/**
@@ -115,7 +109,7 @@ abstract class TraversableElement extends Element
$button = $this->findButton($locator);
if (null === $button) {
- throw $this->elementNotFound('button', 'id|name|title|alt|value', $locator);
+ throw new ElementNotFoundException($this->getDriver(), 'button', 'id|name|title|alt|value', $locator);
}
$button->press();
@@ -142,9 +136,7 @@ abstract class TraversableElement extends Element
*/
public function findField($locator)
{
- return $this->find('named', array(
- 'field', $this->getSelectorsHandler()->xpathLiteral($locator),
- ));
+ return $this->find('named', array('field', $locator));
}
/**
@@ -162,7 +154,7 @@ abstract class TraversableElement extends Element
$field = $this->findField($locator);
if (null === $field) {
- throw $this->elementNotFound('form field', 'id|name|label|value', $locator);
+ throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value|placeholder', $locator);
}
$field->setValue($value);
@@ -212,7 +204,7 @@ abstract class TraversableElement extends Element
$field = $this->findField($locator);
if (null === $field) {
- throw $this->elementNotFound('form field', 'id|name|label|value', $locator);
+ throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
}
$field->check();
@@ -230,7 +222,7 @@ abstract class TraversableElement extends Element
$field = $this->findField($locator);
if (null === $field) {
- throw $this->elementNotFound('form field', 'id|name|label|value', $locator);
+ throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
}
$field->uncheck();
@@ -245,9 +237,7 @@ abstract class TraversableElement extends Element
*/
public function hasSelect($locator)
{
- return $this->has('named', array(
- 'select', $this->getSelectorsHandler()->xpathLiteral($locator),
- ));
+ return $this->has('named', array('select', $locator));
}
/**
@@ -266,7 +256,7 @@ abstract class TraversableElement extends Element
$field = $this->findField($locator);
if (null === $field) {
- throw $this->elementNotFound('form field', 'id|name|label|value', $locator);
+ throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
}
$field->selectOption($value, $multiple);
@@ -281,9 +271,7 @@ abstract class TraversableElement extends Element
*/
public function hasTable($locator)
{
- return $this->has('named', array(
- 'table', $this->getSelectorsHandler()->xpathLiteral($locator),
- ));
+ return $this->has('named', array('table', $locator));
}
/**
@@ -301,7 +289,7 @@ abstract class TraversableElement extends Element
$field = $this->findField($locator);
if (null === $field) {
- throw $this->elementNotFound('form field', 'id|name|label|value', $locator);
+ throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
}
$field->attachFile($path);
diff --git a/vendor/behat/mink/src/Exception/ElementException.php b/vendor/behat/mink/src/Exception/ElementException.php
index 49d5c6c..16ebdc9 100644
--- a/vendor/behat/mink/src/Exception/ElementException.php
+++ b/vendor/behat/mink/src/Exception/ElementException.php
@@ -10,10 +10,12 @@
namespace Behat\Mink\Exception;
+@trigger_error('The class '.__NAMESPACE__.'\ElementException is deprecated as of Mink 1.6 and will be removed in 2.0', E_USER_DEPRECATED);
+
use Behat\Mink\Element\Element;
/**
- * A standard way for elements to re-throw exceptions
+ * A standard way for elements to re-throw exceptions.
*
* @deprecated This exception class is not used anymore in Mink 1.6 and will be removed in 2.0
*
@@ -47,7 +49,7 @@ class ElementException extends Exception
}
/**
- * Get the element that caused the exception
+ * Get the element that caused the exception.
*
* @return Element
*/
diff --git a/vendor/behat/mink/src/Exception/ElementHtmlException.php b/vendor/behat/mink/src/Exception/ElementHtmlException.php
index 99e2ea6..fb2fed6 100644
--- a/vendor/behat/mink/src/Exception/ElementHtmlException.php
+++ b/vendor/behat/mink/src/Exception/ElementHtmlException.php
@@ -10,8 +10,9 @@
namespace Behat\Mink\Exception;
-use Behat\Mink\Session;
+use Behat\Mink\Driver\DriverInterface;
use Behat\Mink\Element\Element;
+use Behat\Mink\Session;
/**
* Exception thrown when an expectation on the HTML of an element fails.
@@ -30,16 +31,16 @@ class ElementHtmlException extends ExpectationException
/**
* Initializes exception.
*
- * @param string $message optional message
- * @param Session $session session instance
- * @param Element $element element
- * @param \Exception $exception expectation exception
+ * @param string $message optional message
+ * @param DriverInterface|Session $driver driver instance
+ * @param Element $element element
+ * @param \Exception $exception expectation exception
*/
- public function __construct($message, Session $session, Element $element, \Exception $exception = null)
+ public function __construct($message, $driver, Element $element, \Exception $exception = null)
{
$this->element = $element;
- parent::__construct($message, $session, $exception);
+ parent::__construct($message, $driver, $exception);
}
protected function getContext()
diff --git a/vendor/behat/mink/src/Exception/ElementNotFoundException.php b/vendor/behat/mink/src/Exception/ElementNotFoundException.php
index 95fd5f0..6716ab3 100644
--- a/vendor/behat/mink/src/Exception/ElementNotFoundException.php
+++ b/vendor/behat/mink/src/Exception/ElementNotFoundException.php
@@ -10,6 +10,7 @@
namespace Behat\Mink\Exception;
+use Behat\Mink\Driver\DriverInterface;
use Behat\Mink\Session;
/**
@@ -22,12 +23,12 @@ class ElementNotFoundException extends ExpectationException
/**
* Initializes exception.
*
- * @param Session $session session instance
- * @param string $type element type
- * @param string $selector element selector type
- * @param string $locator element locator
+ * @param DriverInterface|Session $driver driver instance
+ * @param string $type element type
+ * @param string $selector element selector type
+ * @param string $locator element locator
*/
- public function __construct(Session $session, $type = null, $selector = null, $locator = null)
+ public function __construct($driver, $type = null, $selector = null, $locator = null)
{
$message = '';
@@ -48,6 +49,6 @@ class ElementNotFoundException extends ExpectationException
$message .= ' not found.';
- parent::__construct($message, $session);
+ parent::__construct($message, $driver);
}
}
diff --git a/vendor/behat/mink/src/Exception/ExpectationException.php b/vendor/behat/mink/src/Exception/ExpectationException.php
index 25034d1..35f7150 100644
--- a/vendor/behat/mink/src/Exception/ExpectationException.php
+++ b/vendor/behat/mink/src/Exception/ExpectationException.php
@@ -10,6 +10,7 @@
namespace Behat\Mink\Exception;
+use Behat\Mink\Driver\DriverInterface;
use Behat\Mink\Session;
/**
@@ -22,17 +23,28 @@ use Behat\Mink\Session;
class ExpectationException extends Exception
{
private $session;
+ private $driver;
/**
* Initializes exception.
*
- * @param string $message optional message
- * @param Session $session session instance
- * @param \Exception $exception expectation exception
+ * @param string $message optional message
+ * @param DriverInterface|Session $driver driver instance (or session for BC)
+ * @param \Exception|null $exception expectation exception
*/
- public function __construct($message, Session $session, \Exception $exception = null)
+ public function __construct($message, $driver, \Exception $exception = null)
{
- $this->session = $session;
+ if ($driver instanceof Session) {
+ @trigger_error('Passing a Session object to the ExpectationException constructor is deprecated as of Mink 1.7. Pass the driver instead.', E_USER_DEPRECATED);
+
+ $this->session = $driver;
+ $this->driver = $driver->getDriver();
+ } elseif (!$driver instanceof DriverInterface) {
+ // Trigger an exception as we cannot typehint a disjunction
+ throw new \InvalidArgumentException('The ExpectationException constructor expects a DriverInterface or a Session.');
+ } else {
+ $this->driver = $driver;
+ }
if (!$message && null !== $exception) {
$message = $exception->getMessage();
@@ -50,7 +62,7 @@ class ExpectationException extends Exception
{
try {
$pageText = $this->pipeString($this->trimString($this->getContext())."\n");
- $string = sprintf("%s\n\n%s%s", $this->getMessage(), $this->getResponseInfo(), $pageText);
+ $string = sprintf("%s\n\n%s%s", $this->getMessage(), $this->getResponseInfo(), $pageText);
} catch (\Exception $e) {
return $this->getMessage();
}
@@ -59,22 +71,40 @@ class ExpectationException extends Exception
}
/**
- * Gets the context rendered for this exception
+ * Gets the context rendered for this exception.
*
* @return string
*/
protected function getContext()
{
- return $this->trimBody($this->getSession()->getPage()->getContent());
+ return $this->trimBody($this->driver->getContent());
+ }
+
+ /**
+ * Returns driver.
+ *
+ * @return DriverInterface
+ */
+ protected function getDriver()
+ {
+ return $this->driver;
}
/**
* Returns exception session.
*
* @return Session
+ *
+ * @deprecated since 1.7, to be removed in 2.0. Use getDriver and the driver API instead.
*/
protected function getSession()
{
+ if (null === $this->session) {
+ throw new \LogicException(sprintf('The deprecated method %s cannot be used when passing a driver in the constructor', __METHOD__));
+ }
+
+ @trigger_error(sprintf('The method %s is deprecated as of Mink 1.7 and will be removed in 2.0. Use getDriver and the driver API instead.'));
+
return $this->session;
}
@@ -107,8 +137,8 @@ class ExpectationException extends Exception
/**
* Trims string to specified number of chars.
*
- * @param string $string response content
- * @param integer $count trim count
+ * @param string $string response content
+ * @param int $count trim count
*
* @return string
*/
@@ -130,15 +160,15 @@ class ExpectationException extends Exception
*/
protected function getResponseInfo()
{
- $driver = basename(str_replace('\\', '/', get_class($this->session->getDriver())));
+ $driver = basename(str_replace('\\', '/', get_class($this->driver)));
$info = '+--[ ';
try {
- $info .= 'HTTP/1.1 '.$this->session->getStatusCode().' | ';
+ $info .= 'HTTP/1.1 '.$this->driver->getStatusCode().' | ';
} catch (UnsupportedDriverActionException $e) {
// Ignore the status code when not supported
}
- $info .= $this->session->getCurrentUrl().' | '.$driver." ]\n|\n";
+ $info .= $this->driver->getCurrentUrl().' | '.$driver." ]\n|\n";
return $info;
}
diff --git a/vendor/behat/mink/src/Exception/ResponseTextException.php b/vendor/behat/mink/src/Exception/ResponseTextException.php
index 145ed6d..515c569 100644
--- a/vendor/behat/mink/src/Exception/ResponseTextException.php
+++ b/vendor/behat/mink/src/Exception/ResponseTextException.php
@@ -19,6 +19,6 @@ class ResponseTextException extends ExpectationException
{
protected function getContext()
{
- return $this->getSession()->getPage()->getText();
+ return $this->getDriver()->getText('//html');
}
}
diff --git a/vendor/behat/mink/src/Mink.php b/vendor/behat/mink/src/Mink.php
index d1621b1..333bfbd 100644
--- a/vendor/behat/mink/src/Mink.php
+++ b/vendor/behat/mink/src/Mink.php
@@ -121,7 +121,7 @@ class Mink
}
/**
- * Checks whether a named session (or the default session) has already been started
+ * Checks whether a named session (or the default session) has already been started.
*
* @param string $name session name - if null then the default session will be checked
*
diff --git a/vendor/behat/mink/src/Selector/NamedSelector.php b/vendor/behat/mink/src/Selector/NamedSelector.php
index 4845f99..d1936cc 100644
--- a/vendor/behat/mink/src/Selector/NamedSelector.php
+++ b/vendor/behat/mink/src/Selector/NamedSelector.php
@@ -10,6 +10,8 @@
namespace Behat\Mink\Selector;
+use Behat\Mink\Selector\Xpath\Escaper;
+
/**
* Named selectors engine. Uses registered XPath selectors to create new expressions.
*
@@ -157,12 +159,15 @@ XPATH
.//*[%idOrNameMatch%]
XPATH
);
+ private $xpathEscaper;
/**
* Creates selector instance.
*/
public function __construct()
{
+ $this->xpathEscaper = new Escaper();
+
foreach ($this->replacements as $from => $to) {
$this->replacements[$from] = strtr($to, $this->replacements);
}
@@ -199,11 +204,11 @@ XPATH
}
if (2 == count($locator)) {
- $selector = $locator[0];
- $locator = $locator[1];
+ $selector = $locator[0];
+ $locator = $locator[1];
} else {
- $selector = (string) $locator;
- $locator = null;
+ $selector = (string) $locator;
+ $locator = null;
}
if (!isset($this->selectors[$selector])) {
@@ -217,14 +222,14 @@ XPATH
$xpath = $this->selectors[$selector];
if (null !== $locator) {
- $xpath = strtr($xpath, array('%locator%' => $locator));
+ $xpath = strtr($xpath, array('%locator%' => $this->escapeLocator($locator)));
}
return $xpath;
}
/**
- * Registers a replacement in the list of replacements
+ * Registers a replacement in the list of replacements.
*
* This method must be called in the constructor before calling the parent constructor.
*
@@ -235,4 +240,24 @@ XPATH
{
$this->replacements[$from] = $to;
}
+
+ private function escapeLocator($locator)
+ {
+ // If the locator looks like an escaped one, don't escape it again for BC reasons.
+ if (
+ preg_match('/^\'[^\']*+\'$/', $locator)
+ || (false !== strpos($locator, '\'') && preg_match('/^"[^"]*+"$/', $locator))
+ || ((8 < $length = strlen($locator)) && 'concat(' === substr($locator, 0, 7) && ')' === $locator[$length - 1])
+ ) {
+ @trigger_error(
+ 'Passing an escaped locator to the named selector is deprecated as of 1.7 and will be removed in 2.0.'
+ .' Pass the raw value instead.',
+ E_USER_DEPRECATED
+ );
+
+ return $locator;
+ }
+
+ return $this->xpathEscaper->escapeLiteral($locator);
+ }
}
diff --git a/vendor/behat/mink/src/Selector/SelectorsHandler.php b/vendor/behat/mink/src/Selector/SelectorsHandler.php
index a19de67..09b947c 100644
--- a/vendor/behat/mink/src/Selector/SelectorsHandler.php
+++ b/vendor/behat/mink/src/Selector/SelectorsHandler.php
@@ -75,7 +75,7 @@ class SelectorsHandler
public function getSelector($name)
{
if ('named' === $name) {
- trigger_error(
+ @trigger_error(
'Using the "named" selector directly from the handler is deprecated as of 1.6 and will be removed in 2.0.'
.' Use the "named_partial" or use the "named" selector through the Element API instead.',
E_USER_DEPRECATED
@@ -114,12 +114,22 @@ class SelectorsHandler
/**
* Translates string to XPath literal.
*
+ * @deprecated since Mink 1.7. Use \Behat\Mink\Selector\Xpath\Escaper::escapeLiteral when building Xpath
+ * or pass the unescaped value when using the named selector.
+ *
* @param string $s
*
* @return string
*/
public function xpathLiteral($s)
{
+ @trigger_error(
+ 'The '.__METHOD__.' method is deprecated as of 1.7 and will be removed in 2.0.'
+ .' Use \Behat\Mink\Selector\Xpath\Escaper::escapeLiteral instead when building Xpath'
+ .' or pass the unescaped value when using the named selector.',
+ E_USER_DEPRECATED
+ );
+
return $this->escaper->escapeLiteral($s);
}
}
diff --git a/vendor/behat/mink/src/Selector/Xpath/Escaper.php b/vendor/behat/mink/src/Selector/Xpath/Escaper.php
index be35000..c3aa7a3 100644
--- a/vendor/behat/mink/src/Selector/Xpath/Escaper.php
+++ b/vendor/behat/mink/src/Selector/Xpath/Escaper.php
@@ -47,6 +47,6 @@ class Escaper
}
}
- return sprintf("concat(%s)", implode($parts, ','));
+ return sprintf('concat(%s)', implode($parts, ','));
}
}
diff --git a/vendor/behat/mink/src/Session.php b/vendor/behat/mink/src/Session.php
index c67f7f9..c8815f9 100644
--- a/vendor/behat/mink/src/Session.php
+++ b/vendor/behat/mink/src/Session.php
@@ -39,9 +39,9 @@ class Session
$selectorsHandler = new SelectorsHandler();
}
- $this->driver = $driver;
+ $this->driver = $driver;
$this->selectorsHandler = $selectorsHandler;
- $this->page = new DocumentElement($this);
+ $this->page = new DocumentElement($this);
}
/**
@@ -144,7 +144,7 @@ class Session
}
/**
- * Sets HTTP Basic authentication parameters
+ * Sets HTTP Basic authentication parameters.
*
* @param string|Boolean $user user name or false to disable authentication
* @param string $password password
@@ -176,6 +176,27 @@ class Session
}
/**
+ * Returns specific response header.
+ *
+ * @param string $name
+ *
+ * @return string|null
+ */
+ public function getResponseHeader($name)
+ {
+ $headers = $this->driver->getResponseHeaders();
+
+ $name = strtolower($name);
+ $headers = array_change_key_case($headers, CASE_LOWER);
+
+ if (!isset($headers[$name])) {
+ return null;
+ }
+
+ return is_array($headers[$name]) ? $headers[$name][0] : $headers[$name];
+ }
+
+ /**
* Sets cookie.
*
* @param string $name
@@ -201,7 +222,7 @@ class Session
/**
* Returns response status code.
*
- * @return integer
+ * @return int
*/
public function getStatusCode()
{
@@ -230,7 +251,7 @@ class Session
}
/**
- * Return the names of all open windows
+ * Return the names of all open windows.
*
* @return array Array of all open window's names.
*/
@@ -240,7 +261,7 @@ class Session
}
/**
- * Return the name of the currently active window
+ * Return the name of the currently active window.
*
* @return string The name of the current window.
*/
@@ -318,10 +339,10 @@ class Session
/**
* Waits some time or until JS condition turns true.
*
- * @param integer $time time in milliseconds
- * @param string $condition JS condition
+ * @param int $time time in milliseconds
+ * @param string $condition JS condition
*
- * @return boolean
+ * @return bool
*/
public function wait($time, $condition = 'false')
{
@@ -331,9 +352,9 @@ class Session
/**
* Set the dimensions of the window.
*
- * @param integer $width set the window width, measured in pixels
- * @param integer $height set the window height, measured in pixels
- * @param string $name window name (null for the main window)
+ * @param int $width set the window width, measured in pixels
+ * @param int $height set the window height, measured in pixels
+ * @param string $name window name (null for the main window)
*/
public function resizeWindow($width, $height, $name = null)
{
@@ -341,7 +362,7 @@ class Session
}
/**
- * Maximize the window if it is not maximized already
+ * Maximize the window if it is not maximized already.
*
* @param string $name window name (null for the main window)
*/
diff --git a/vendor/behat/mink/src/WebAssert.php b/vendor/behat/mink/src/WebAssert.php
index 127c3c1..0f0e6fa 100644
--- a/vendor/behat/mink/src/WebAssert.php
+++ b/vendor/behat/mink/src/WebAssert.php
@@ -49,7 +49,7 @@ class WebAssert
public function addressEquals($page)
{
$expected = $this->cleanUrl($page);
- $actual = $this->getCurrentUrlPath();
+ $actual = $this->getCurrentUrlPath();
$this->assert($actual === $expected, sprintf('Current page is "%s", but "%s" expected.', $actual, $expected));
}
@@ -64,7 +64,7 @@ class WebAssert
public function addressNotEquals($page)
{
$expected = $this->cleanUrl($page);
- $actual = $this->getCurrentUrlPath();
+ $actual = $this->getCurrentUrlPath();
$this->assert($actual !== $expected, sprintf('Current page is "%s", but should not be.', $actual));
}
@@ -85,7 +85,7 @@ class WebAssert
}
/**
- * Checks that specified cookie exists and its value equals to a given one
+ * Checks that specified cookie exists and its value equals to a given one.
*
* @param string $name cookie name
* @param string $value cookie value
@@ -103,7 +103,7 @@ class WebAssert
}
/**
- * Checks that specified cookie exists
+ * Checks that specified cookie exists.
*
* @param string $name cookie name
*
@@ -118,7 +118,7 @@ class WebAssert
/**
* Checks that current response code equals to provided one.
*
- * @param integer $code
+ * @param int $code
*
* @throws ExpectationException
*/
@@ -133,7 +133,7 @@ class WebAssert
/**
* Checks that current response code not equals to provided one.
*
- * @param integer $code
+ * @param int $code
*
* @throws ExpectationException
*/
@@ -146,6 +146,106 @@ class WebAssert
}
/**
+ * Checks that current response header equals value.
+ *
+ * @param string $name
+ * @param string $value
+ *
+ * @throws ExpectationException
+ */
+ public function responseHeaderEquals($name, $value)
+ {
+ $actual = $this->session->getResponseHeader($name);
+ $message = sprintf('Current response header "%s" is "%s", but "%s" expected.', $name, $actual, $value);
+
+ $this->assert($value === $actual, $message);
+ }
+
+ /**
+ * Checks that current response header does not equal value.
+ *
+ * @param string $name
+ * @param string $value
+ *
+ * @throws ExpectationException
+ */
+ public function responseHeaderNotEquals($name, $value)
+ {
+ $actual = $this->session->getResponseHeader($name);
+ $message = sprintf('Current response header "%s" is "%s", but should not be.', $name, $actual, $value);
+
+ $this->assert($value !== $actual, $message);
+ }
+
+ /**
+ * Checks that current response header contains value.
+ *
+ * @param string $name
+ * @param string $value
+ *
+ * @throws ExpectationException
+ */
+ public function responseHeaderContains($name, $value)
+ {
+ $actual = $this->session->getResponseHeader($name);
+ $message = sprintf('The text "%s" was not found anywhere in the "%s" response header.', $value, $name);
+
+ $this->assert(false !== stripos($actual, $value), $message);
+ }
+
+ /**
+ * Checks that current response header does not contain value.
+ *
+ * @param string $name
+ * @param string $value
+ *
+ * @throws ExpectationException
+ */
+ public function responseHeaderNotContains($name, $value)
+ {
+ $actual = $this->session->getResponseHeader($name);
+ $message = sprintf('The text "%s" was found in the "%s" response header, but it should not.', $value, $name);
+
+ $this->assert(false === stripos($actual, $value), $message);
+ }
+
+ /**
+ * Checks that current response header matches regex.
+ *
+ * @param string $name
+ * @param string $regex
+ *
+ * @throws ExpectationException
+ */
+ public function responseHeaderMatches($name, $regex)
+ {
+ $actual = $this->session->getResponseHeader($name);
+ $message = sprintf('The pattern "%s" was not found anywhere in the "%s" response header.', $regex, $name);
+
+ $this->assert((bool) preg_match($regex, $actual), $message);
+ }
+
+ /**
+ * Checks that current response header does not match regex.
+ *
+ * @param string $name
+ * @param string $regex
+ *
+ * @throws ExpectationException
+ */
+ public function responseHeaderNotMatches($name, $regex)
+ {
+ $actual = $this->session->getResponseHeader($name);
+ $message = sprintf(
+ 'The pattern "%s" was found in the text of the "%s" response header, but it should not.',
+ $regex,
+ $name
+ );
+
+ $this->assert(!preg_match($regex, $actual), $message);
+ }
+
+ /**
* Checks that current page contains text.
*
* @param string $text
@@ -156,7 +256,7 @@ class WebAssert
{
$actual = $this->session->getPage()->getText();
$actual = preg_replace('/\s+/u', ' ', $actual);
- $regex = '/'.preg_quote($text, '/').'/ui';
+ $regex = '/'.preg_quote($text, '/').'/ui';
$message = sprintf('The text "%s" was not found anywhere in the text of the current page.', $text);
$this->assertResponseText((bool) preg_match($regex, $actual), $message);
@@ -173,7 +273,7 @@ class WebAssert
{
$actual = $this->session->getPage()->getText();
$actual = preg_replace('/\s+/u', ' ', $actual);
- $regex = '/'.preg_quote($text, '/').'/ui';
+ $regex = '/'.preg_quote($text, '/').'/ui';
$message = sprintf('The text "%s" appears in the text of this page, but it should not.', $text);
$this->assertResponseText(!preg_match($regex, $actual), $message);
@@ -219,7 +319,7 @@ class WebAssert
public function responseContains($text)
{
$actual = $this->session->getPage()->getContent();
- $regex = '/'.preg_quote($text, '/').'/ui';
+ $regex = '/'.preg_quote($text, '/').'/ui';
$message = sprintf('The string "%s" was not found anywhere in the HTML response of the current page.', $text);
$this->assert((bool) preg_match($regex, $actual), $message);
@@ -235,7 +335,7 @@ class WebAssert
public function responseNotContains($text)
{
$actual = $this->session->getPage()->getContent();
- $regex = '/'.preg_quote($text, '/').'/ui';
+ $regex = '/'.preg_quote($text, '/').'/ui';
$message = sprintf('The string "%s" appears in the HTML response of this page, but it should not.', $text);
$this->assert(!preg_match($regex, $actual), $message);
@@ -276,7 +376,7 @@ class WebAssert
*
* @param string $selectorType element selector type (css, xpath)
* @param string|array $selector element selector
- * @param integer $count expected count
+ * @param int $count expected count
* @param ElementInterface $container document to check against
*
* @throws ExpectationException
@@ -317,7 +417,7 @@ class WebAssert
$selector = implode(' ', $selector);
}
- throw new ElementNotFoundException($this->session, 'element', $selectorType, $selector);
+ throw new ElementNotFoundException($this->session->getDriver(), 'element', $selectorType, $selector);
}
return $node;
@@ -357,8 +457,8 @@ class WebAssert
public function elementTextContains($selectorType, $selector, $text)
{
$element = $this->elementExists($selectorType, $selector);
- $actual = $element->getText();
- $regex = '/'.preg_quote($text, '/').'/ui';
+ $actual = $element->getText();
+ $regex = '/'.preg_quote($text, '/').'/ui';
$message = sprintf(
'The text "%s" was not found in the text of the %s.',
@@ -381,8 +481,8 @@ class WebAssert
public function elementTextNotContains($selectorType, $selector, $text)
{
$element = $this->elementExists($selectorType, $selector);
- $actual = $element->getText();
- $regex = '/'.preg_quote($text, '/').'/ui';
+ $actual = $element->getText();
+ $regex = '/'.preg_quote($text, '/').'/ui';
$message = sprintf(
'The text "%s" appears in the text of the %s, but it should not.',
@@ -405,8 +505,8 @@ class WebAssert
public function elementContains($selectorType, $selector, $html)
{
$element = $this->elementExists($selectorType, $selector);
- $actual = $element->getHtml();
- $regex = '/'.preg_quote($html, '/').'/ui';
+ $actual = $element->getHtml();
+ $regex = '/'.preg_quote($html, '/').'/ui';
$message = sprintf(
'The string "%s" was not found in the HTML of the %s.',
@@ -429,8 +529,8 @@ class WebAssert
public function elementNotContains($selectorType, $selector, $html)
{
$element = $this->elementExists($selectorType, $selector);
- $actual = $element->getHtml();
- $regex = '/'.preg_quote($html, '/').'/ui';
+ $actual = $element->getHtml();
+ $regex = '/'.preg_quote($html, '/').'/ui';
$message = sprintf(
'The string "%s" appears in the HTML of the %s, but it should not.',
@@ -480,8 +580,8 @@ class WebAssert
public function elementAttributeContains($selectorType, $selector, $attribute, $text)
{
$element = $this->elementAttributeExists($selectorType, $selector, $attribute);
- $actual = $element->getAttribute($attribute);
- $regex = '/'.preg_quote($text, '/').'/ui';
+ $actual = $element->getAttribute($attribute);
+ $regex = '/'.preg_quote($text, '/').'/ui';
$message = sprintf(
'The text "%s" was not found in the attribute "%s" of the %s.',
@@ -506,8 +606,8 @@ class WebAssert
public function elementAttributeNotContains($selectorType, $selector, $attribute, $text)
{
$element = $this->elementAttributeExists($selectorType, $selector, $attribute);
- $actual = $element->getAttribute($attribute);
- $regex = '/'.preg_quote($text, '/').'/ui';
+ $actual = $element->getAttribute($attribute);
+ $regex = '/'.preg_quote($text, '/').'/ui';
$message = sprintf(
'The text "%s" was found in the attribute "%s" of the %s.',
@@ -535,7 +635,7 @@ class WebAssert
$node = $container->findField($field);
if (null === $node) {
- throw new ElementNotFoundException($this->session, 'form field', 'id|name|label|value', $field);
+ throw new ElementNotFoundException($this->session->getDriver(), 'form field', 'id|name|label|value', $field);
}
return $node;
@@ -568,9 +668,9 @@ class WebAssert
*/
public function fieldValueEquals($field, $value, TraversableElement $container = null)
{
- $node = $this->fieldExists($field, $container);
+ $node = $this->fieldExists($field, $container);
$actual = $node->getValue();
- $regex = '/^'.preg_quote($value, '/').'$/ui';
+ $regex = '/^'.preg_quote($value, '/').'$/ui';
$message = sprintf('The field "%s" value is "%s", but "%s" expected.', $field, $actual, $value);
@@ -588,9 +688,9 @@ class WebAssert
*/
public function fieldValueNotEquals($field, $value, TraversableElement $container = null)
{
- $node = $this->fieldExists($field, $container);
+ $node = $this->fieldExists($field, $container);
$actual = $node->getValue();
- $regex = '/^'.preg_quote($value, '/').'$/ui';
+ $regex = '/^'.preg_quote($value, '/').'$/ui';
$message = sprintf('The field "%s" value is "%s", but it should not be.', $field, $actual);
@@ -650,7 +750,7 @@ class WebAssert
$fragment = empty($parts['fragment']) ? '' : '#'.$parts['fragment'];
$path = empty($parts['path']) ? '/' : $parts['path'];
- return preg_replace('/^\/[^\.\/]+\.php/', '', $path).$fragment;
+ return preg_replace('/^\/[^\.\/]+\.php\//', '/', $path).$fragment;
}
/**
@@ -667,7 +767,7 @@ class WebAssert
return;
}
- throw new ExpectationException($message, $this->session);
+ throw new ExpectationException($message, $this->session->getDriver());
}
/**
@@ -684,7 +784,7 @@ class WebAssert
return;
}
- throw new ResponseTextException($message, $this->session);
+ throw new ResponseTextException($message, $this->session->getDriver());
}
/**
@@ -702,7 +802,7 @@ class WebAssert
return;
}
- throw new ElementHtmlException($message, $this->session, $element);
+ throw new ElementHtmlException($message, $this->session->getDriver(), $element);
}
/**
@@ -720,13 +820,13 @@ class WebAssert
return;
}
- throw new ElementTextException($message, $this->session, $element);
+ throw new ElementTextException($message, $this->session->getDriver(), $element);
}
/**
* @param string $selectorType
* @param string|array $selector
- * @param boolean $plural
+ * @param bool $plural
*
* @return string
*/
diff --git a/vendor/behat/mink/tests/Driver/CoreDriverTest.php b/vendor/behat/mink/tests/Driver/CoreDriverTest.php
index d99b17f..cd1fe64 100644
--- a/vendor/behat/mink/tests/Driver/CoreDriverTest.php
+++ b/vendor/behat/mink/tests/Driver/CoreDriverTest.php
@@ -2,6 +2,8 @@
namespace Behat\Mink\Tests\Driver;
+use Behat\Mink\Element\NodeElement;
+
class CoreDriverTest extends \PHPUnit_Framework_TestCase
{
public function testNoExtraMethods()
@@ -17,6 +19,34 @@ class CoreDriverTest extends \PHPUnit_Framework_TestCase
}
}
+ public function testCreateNodeElements()
+ {
+ $driver = $this->getMockBuilder('Behat\Mink\Driver\CoreDriver')
+ ->setMethods(array('findElementXpaths'))
+ ->getMockForAbstractClass();
+
+ $session = $this->getMockBuilder('Behat\Mink\Session')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $driver->setSession($session);
+
+ $driver->expects($this->once())
+ ->method('findElementXpaths')
+ ->with('xpath')
+ ->willReturn(array('xpath1', 'xpath2'));
+
+ /** @var NodeElement[] $elements */
+ $elements = $driver->find('xpath');
+
+ $this->assertInternalType('array', $elements);
+ $this->assertCount(2, $elements);
+ $this->assertContainsOnlyInstancesOf('Behat\Mink\Element\NodeElement', $elements);
+
+ $this->assertSame('xpath1', $elements[0]->getXpath());
+ $this->assertSame('xpath2', $elements[1]->getXpath());
+ }
+
/**
* @dataProvider getDriverInterfaceMethods
*/
@@ -29,6 +59,10 @@ class CoreDriverTest extends \PHPUnit_Framework_TestCase
sprintf('CoreDriver should implement a dummy %s method', $method->getName())
);
+ if ('setSession' === $method->getName()) {
+ return; // setSession is actually implemented, so we don't expect an exception here.
+ }
+
$driver = $this->getMockForAbstractClass('Behat\Mink\Driver\CoreDriver');
$this->setExpectedException('Behat\Mink\Exception\UnsupportedDriverActionException');
diff --git a/vendor/behat/mink/tests/Element/DocumentElementTest.php b/vendor/behat/mink/tests/Element/DocumentElementTest.php
index bacd06d..2105ab7 100644
--- a/vendor/behat/mink/tests/Element/DocumentElementTest.php
+++ b/vendor/behat/mink/tests/Element/DocumentElementTest.php
@@ -19,6 +19,9 @@ class DocumentElementTest extends ElementTest
$this->document = new DocumentElement($this->session);
}
+ /**
+ * @group legacy
+ */
public function testGetSession()
{
$this->assertEquals($this->session, $this->document->getSession());
diff --git a/vendor/behat/mink/tests/Element/ElementTest.php b/vendor/behat/mink/tests/Element/ElementTest.php
index a8c8a8c..650284c 100644
--- a/vendor/behat/mink/tests/Element/ElementTest.php
+++ b/vendor/behat/mink/tests/Element/ElementTest.php
@@ -36,11 +36,6 @@ abstract class ElementTest extends \PHPUnit_Framework_TestCase
$this->selectors = $this->getMockBuilder('Behat\Mink\Selector\SelectorsHandler')->getMock();
$this->session = new Session($this->driver, $this->selectors);
-
- $this->selectors
- ->expects($this->any())
- ->method('xpathLiteral')
- ->will($this->returnArgument(0));
}
protected function mockNamedFinder($xpath, array $results, $locator, $times = 2)
@@ -55,7 +50,7 @@ abstract class ElementTest extends \PHPUnit_Framework_TestCase
$processedResults[] = $result;
if (empty($result)) {
$processedResults[] = $result;
- $times++;
+ ++$times;
}
}
diff --git a/vendor/behat/mink/tests/Element/NodeElementTest.php b/vendor/behat/mink/tests/Element/NodeElementTest.php
index b6a8bde..f769ddd 100644
--- a/vendor/behat/mink/tests/Element/NodeElementTest.php
+++ b/vendor/behat/mink/tests/Element/NodeElementTest.php
@@ -76,7 +76,7 @@ class NodeElementTest extends ElementTest
$node = new NodeElement('some xpath', $this->session);
$result = $node->waitFor(5, function ($givenNode) use (&$callCounter) {
- $callCounter++;
+ ++$callCounter;
if (1 === $callCounter) {
return null;
@@ -93,6 +93,9 @@ class NodeElementTest extends ElementTest
$this->assertSame($node, $result, '->waitFor() returns node found in callback');
}
+ /**
+ * @medium
+ */
public function testWaitForTimeout()
{
$node = new NodeElement('some xpath', $this->session);
@@ -153,11 +156,13 @@ class NodeElementTest extends ElementTest
->expects($this->exactly(6))
->method('getAttribute')
->with('input_tag', 'class')
- ->will($this->returnValue('class1 class2'));
+ ->will($this->returnValue('
+ class1 class2
+ '));
- $this->assertTrue($node->hasClass('class1'));
- $this->assertTrue($node->hasClass('class2'));
- $this->assertFalse($node->hasClass('class3'));
+ $this->assertTrue($node->hasClass('class1'), 'The "class1" was found');
+ $this->assertTrue($node->hasClass('class2'), 'The "class2" was found');
+ $this->assertFalse($node->hasClass('class3'), 'The "class3" was not found');
}
public function testHasClassWithoutArgument()
@@ -571,8 +576,8 @@ class NodeElementTest extends ElementTest
public function testFindAllParentUnion()
{
$node = new NodeElement('some_xpath | another_xpath', $this->session);
- $xpath = "some_tag1 | some_tag2";
- $expectedPrefixed = "(some_xpath | another_xpath)/some_tag1 | (some_xpath | another_xpath)/some_tag2";
+ $xpath = 'some_tag1 | some_tag2';
+ $expectedPrefixed = '(some_xpath | another_xpath)/some_tag1 | (some_xpath | another_xpath)/some_tag2';
$this->driver
->expects($this->exactly(1))
diff --git a/vendor/behat/mink/tests/Exception/ElementExceptionTest.php b/vendor/behat/mink/tests/Exception/ElementExceptionTest.php
index 021e8d5..87bf2ca 100644
--- a/vendor/behat/mink/tests/Exception/ElementExceptionTest.php
+++ b/vendor/behat/mink/tests/Exception/ElementExceptionTest.php
@@ -4,6 +4,9 @@ namespace Behat\Mink\Tests\Exception;
use Behat\Mink\Exception\ElementException;
+/**
+ * @group legacy
+ */
class ElementExceptionTest extends \PHPUnit_Framework_TestCase
{
public function testMessage()
diff --git a/vendor/behat/mink/tests/Exception/ElementHtmlExceptionTest.php b/vendor/behat/mink/tests/Exception/ElementHtmlExceptionTest.php
index 63d39dd..7d6ea82 100644
--- a/vendor/behat/mink/tests/Exception/ElementHtmlExceptionTest.php
+++ b/vendor/behat/mink/tests/Exception/ElementHtmlExceptionTest.php
@@ -11,14 +11,10 @@ class ElementHtmlExceptionTest extends \PHPUnit_Framework_TestCase
$driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
$element = $this->getElementMock();
- $session = $this->getSessionMock();
- $session->expects($this->any())
- ->method('getDriver')
- ->will($this->returnValue($driver));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getStatusCode')
->will($this->returnValue(200));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getCurrentUrl')
->will($this->returnValue('http://localhost/test'));
@@ -40,18 +36,11 @@ TXT;
$expected = sprintf($expected.' ', get_class($driver));
- $exception = new ElementHtmlException('Html error', $session, $element);
+ $exception = new ElementHtmlException('Html error', $driver, $element);
$this->assertEquals($expected, $exception->__toString());
}
- private function getSessionMock()
- {
- return $this->getMockBuilder('Behat\Mink\Session')
- ->disableOriginalConstructor()
- ->getMock();
- }
-
private function getElementMock()
{
return $this->getMockBuilder('Behat\Mink\Element\NodeElement')
diff --git a/vendor/behat/mink/tests/Exception/ElementNotFoundExceptionTest.php b/vendor/behat/mink/tests/Exception/ElementNotFoundExceptionTest.php
index 8cb4e5d..6faa55c 100644
--- a/vendor/behat/mink/tests/Exception/ElementNotFoundExceptionTest.php
+++ b/vendor/behat/mink/tests/Exception/ElementNotFoundExceptionTest.php
@@ -11,11 +11,9 @@ class ElementNotFoundExceptionTest extends \PHPUnit_Framework_TestCase
*/
public function testBuildMessage($message, $type, $selector = null, $locator = null)
{
- $session = $this->getMockBuilder('Behat\Mink\Session')
- ->disableOriginalConstructor()
- ->getMock();
+ $driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
- $exception = new ElementNotFoundException($session, $type, $selector, $locator);
+ $exception = new ElementNotFoundException($driver, $type, $selector, $locator);
$this->assertEquals($message, $exception->getMessage());
}
@@ -31,4 +29,22 @@ class ElementNotFoundExceptionTest extends \PHPUnit_Framework_TestCase
array('Tag with name "foobar" not found.', null, 'name', 'foobar'),
);
}
+
+ /**
+ * @group legacy
+ */
+ public function testConstructWithSession()
+ {
+ $driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
+ $session = $this->getMockBuilder('Behat\Mink\Session')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $session->expects($this->any())
+ ->method('getDriver')
+ ->will($this->returnValue($driver));
+
+ $exception = new ElementNotFoundException($session);
+
+ $this->assertEquals('Tag not found.', $exception->getMessage());
+ }
}
diff --git a/vendor/behat/mink/tests/Exception/ElementTextExceptionTest.php b/vendor/behat/mink/tests/Exception/ElementTextExceptionTest.php
index 73cef5b..f8d5e4c 100644
--- a/vendor/behat/mink/tests/Exception/ElementTextExceptionTest.php
+++ b/vendor/behat/mink/tests/Exception/ElementTextExceptionTest.php
@@ -11,14 +11,10 @@ class ElementTextExceptionTest extends \PHPUnit_Framework_TestCase
$driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
$element = $this->getElementMock();
- $session = $this->getSessionMock();
- $session->expects($this->any())
- ->method('getDriver')
- ->will($this->returnValue($driver));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getStatusCode')
->will($this->returnValue(200));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getCurrentUrl')
->will($this->returnValue('http://localhost/test'));
@@ -38,18 +34,11 @@ TXT;
$expected = sprintf($expected.' ', get_class($driver));
- $exception = new ElementTextException('Text error', $session, $element);
+ $exception = new ElementTextException('Text error', $driver, $element);
$this->assertEquals($expected, $exception->__toString());
}
- private function getSessionMock()
- {
- return $this->getMockBuilder('Behat\Mink\Session')
- ->disableOriginalConstructor()
- ->getMock();
- }
-
private function getElementMock()
{
return $this->getMockBuilder('Behat\Mink\Element\NodeElement')
diff --git a/vendor/behat/mink/tests/Exception/ExpectationExceptionTest.php b/vendor/behat/mink/tests/Exception/ExpectationExceptionTest.php
index 466bcca..a327fcb 100644
--- a/vendor/behat/mink/tests/Exception/ExpectationExceptionTest.php
+++ b/vendor/behat/mink/tests/Exception/ExpectationExceptionTest.php
@@ -8,7 +8,7 @@ class ExpectationExceptionTest extends \PHPUnit_Framework_TestCase
{
public function testEmptyMessageAndPreviousException()
{
- $exception = new ExpectationException('', $this->getSessionMock(), new \Exception('Something failed'));
+ $exception = new ExpectationException('', $this->getMock('Behat\Mink\Driver\DriverInterface'), new \Exception('Something failed'));
$this->assertEquals('Something failed', $exception->getMessage());
}
@@ -16,24 +16,16 @@ class ExpectationExceptionTest extends \PHPUnit_Framework_TestCase
public function testExceptionToString()
{
$driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
- $page = $this->getPageMock();
- $session = $this->getSessionMock();
- $session->expects($this->any())
- ->method('getDriver')
- ->will($this->returnValue($driver));
- $session->expects($this->any())
- ->method('getPage')
- ->will($this->returnValue($page));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getStatusCode')
->will($this->returnValue(200));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getCurrentUrl')
->will($this->returnValue('http://localhost/test'));
$html = "<html><head><title>Hello</title></head>\n<body>\n<h1>Hello world</h1>\n<p>Test</p>\n</body></html>";
- $page->expects($this->any())
+ $driver->expects($this->any())
->method('getContent')
->will($this->returnValue($html));
@@ -51,7 +43,7 @@ TXT;
$expected = sprintf($expected.' ', get_class($driver));
- $exception = new ExpectationException('Expectation failure', $session);
+ $exception = new ExpectationException('Expectation failure', $driver);
$this->assertEquals($expected, $exception->__toString());
}
@@ -59,26 +51,18 @@ TXT;
public function testBigContent()
{
$driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
- $page = $this->getPageMock();
- $session = $this->getSessionMock();
- $session->expects($this->any())
- ->method('getDriver')
- ->will($this->returnValue($driver));
- $session->expects($this->any())
- ->method('getPage')
- ->will($this->returnValue($page));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getStatusCode')
->will($this->returnValue(200));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getCurrentUrl')
->will($this->returnValue('http://localhost/test'));
$body = str_repeat('a', 1001 - strlen('<body></body>'));
$html = sprintf("<html><head><title>Hello</title></head>\n<body>%s</body></html>", $body);
- $page->expects($this->any())
+ $driver->expects($this->any())
->method('getContent')
->will($this->returnValue($html));
@@ -93,34 +77,38 @@ TXT;
$expected = sprintf($expected.' ', get_class($driver), $body);
- $exception = new ExpectationException('Expectation failure', $session);
+ $exception = new ExpectationException('Expectation failure', $driver);
$this->assertEquals($expected, $exception->__toString());
}
public function testExceptionWhileRenderingString()
{
- $session = $this->getSessionMock();
- $session->expects($this->any())
- ->method('getPage')
+ $driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
+ $driver->expects($this->any())
+ ->method('getContent')
->will($this->throwException(new \Exception('Broken page')));
- $exception = new ExpectationException('Expectation failure', $session);
+ $exception = new ExpectationException('Expectation failure', $driver);
$this->assertEquals('Expectation failure', $exception->__toString());
}
- private function getSessionMock()
+ /**
+ * @group legacy
+ */
+ public function testConstructWithSession()
{
- return $this->getMockBuilder('Behat\Mink\Session')
+ $driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
+ $session = $this->getMockBuilder('Behat\Mink\Session')
->disableOriginalConstructor()
->getMock();
- }
+ $session->expects($this->any())
+ ->method('getDriver')
+ ->will($this->returnValue($driver));
- private function getPageMock()
- {
- return $this->getMockBuilder('Behat\Mink\Element\DocumentElement')
- ->disableOriginalConstructor()
- ->getMock();
+ $exception = new ExpectationException('', $session, new \Exception('Something failed'));
+
+ $this->assertEquals('Something failed', $exception->getMessage());
}
}
diff --git a/vendor/behat/mink/tests/Exception/ResponseTextExceptionTest.php b/vendor/behat/mink/tests/Exception/ResponseTextExceptionTest.php
index 4651b7c..429721d 100644
--- a/vendor/behat/mink/tests/Exception/ResponseTextExceptionTest.php
+++ b/vendor/behat/mink/tests/Exception/ResponseTextExceptionTest.php
@@ -9,24 +9,16 @@ class ResponseTextExceptionTest extends \PHPUnit_Framework_TestCase
public function testExceptionToString()
{
$driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
- $page = $this->getPageMock();
-
- $session = $this->getSessionMock();
- $session->expects($this->any())
- ->method('getDriver')
- ->will($this->returnValue($driver));
- $session->expects($this->any())
- ->method('getPage')
- ->will($this->returnValue($page));
- $session->expects($this->any())
+
+ $driver->expects($this->any())
->method('getStatusCode')
->will($this->returnValue(200));
- $session->expects($this->any())
+ $driver->expects($this->any())
->method('getCurrentUrl')
->will($this->returnValue('http://localhost/test'));
-
- $page->expects($this->any())
+ $driver->expects($this->any())
->method('getText')
+ ->with('//html')
->will($this->returnValue("Hello world\nTest\n"));
$expected = <<<'TXT'
@@ -41,22 +33,8 @@ TXT;
$expected = sprintf($expected.' ', get_class($driver));
- $exception = new ResponseTextException('Text error', $session);
+ $exception = new ResponseTextException('Text error', $driver);
$this->assertEquals($expected, $exception->__toString());
}
-
- private function getSessionMock()
- {
- return $this->getMockBuilder('Behat\Mink\Session')
- ->disableOriginalConstructor()
- ->getMock();
- }
-
- private function getPageMock()
- {
- return $this->getMockBuilder('Behat\Mink\Element\DocumentElement')
- ->disableOriginalConstructor()
- ->getMock();
- }
}
diff --git a/vendor/behat/mink/tests/Selector/NamedSelectorTest.php b/vendor/behat/mink/tests/Selector/NamedSelectorTest.php
index e0de1bc..5124a46 100644
--- a/vendor/behat/mink/tests/Selector/NamedSelectorTest.php
+++ b/vendor/behat/mink/tests/Selector/NamedSelectorTest.php
@@ -3,7 +3,7 @@
namespace Behat\Mink\Tests\Selector;
use Behat\Mink\Selector\NamedSelector;
-use Behat\Mink\Selector\SelectorsHandler;
+use Behat\Mink\Selector\Xpath\Escaper;
abstract class NamedSelectorTest extends \PHPUnit_Framework_TestCase
{
@@ -42,10 +42,6 @@ abstract class NamedSelectorTest extends \PHPUnit_Framework_TestCase
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->loadHTML(file_get_contents(__DIR__.'/fixtures/'.$fixtureFile));
- // Escape the locator as Mink 1.x expects the caller of the NamedSelector to handle it
- $selectorsHandler = new SelectorsHandler();
- $locator = $selectorsHandler->xpathLiteral($locator);
-
$namedSelector = $this->getSelector();
$xpath = $namedSelector->translateToXPath(array($selector, $locator));
@@ -56,6 +52,19 @@ abstract class NamedSelectorTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expectedCount, $nodeList->length);
}
+ /**
+ * @dataProvider getSelectorTests
+ * @group legacy
+ */
+ public function testEscapedSelectors($fixtureFile, $selector, $locator, $expectedExactCount, $expectedPartialCount = null)
+ {
+ // Escape the locator as Mink 1.x expects the caller of the NamedSelector to handle it
+ $escaper = new Escaper();
+ $locator = $escaper->escapeLiteral($locator);
+
+ $this->testSelectors($fixtureFile, $selector, $locator, $expectedExactCount, $expectedPartialCount);
+ }
+
public function getSelectorTests()
{
$fieldCount = 8; // fields without `type` attribute
@@ -122,6 +131,7 @@ abstract class NamedSelectorTest extends \PHPUnit_Framework_TestCase
// 3 matches, because matches every HTML node in path: html > body > div
'content' => array('test.html', 'content', 'content-text', 1, 4),
+ 'content with quotes' => array('test.html', 'content', 'some "quoted" content', 1, 3),
'select (name/label)' => array('test.html', 'select', 'the-field', 3),
'select (with-id)' => array('test.html', 'select', 'the-field-select', 1),
@@ -152,7 +162,7 @@ abstract class NamedSelectorTest extends \PHPUnit_Framework_TestCase
abstract protected function getSelector();
/**
- * @return boolean
+ * @return bool
*/
abstract protected function allowPartialMatch();
}
diff --git a/vendor/behat/mink/tests/Selector/SelectorsHandlerTest.php b/vendor/behat/mink/tests/Selector/SelectorsHandlerTest.php
index a20d3d9..fb63b32 100644
--- a/vendor/behat/mink/tests/Selector/SelectorsHandlerTest.php
+++ b/vendor/behat/mink/tests/Selector/SelectorsHandlerTest.php
@@ -71,6 +71,9 @@ class SelectorsHandlerTest extends \PHPUnit_Framework_TestCase
$handler->selectorToXpath('undefined', 'asd');
}
+ /**
+ * @group legacy
+ */
public function testXpathLiteral()
{
$handler = new SelectorsHandler();
@@ -78,6 +81,9 @@ class SelectorsHandlerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals("'some simple string'", $handler->xpathLiteral('some simple string'));
}
+ /**
+ * @group legacy
+ */
public function testBcLayer()
{
$selector = $this->getMockBuilder('Behat\Mink\Selector\SelectorInterface')->getMock();
@@ -85,8 +91,6 @@ class SelectorsHandlerTest extends \PHPUnit_Framework_TestCase
$handler->registerSelector('named_partial', $selector);
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->assertSame($selector, $handler->getSelector('named'));
}
}
diff --git a/vendor/behat/mink/tests/Selector/fixtures/test.html b/vendor/behat/mink/tests/Selector/fixtures/test.html
index c64ae10..1190e9e 100644
--- a/vendor/behat/mink/tests/Selector/fixtures/test.html
+++ b/vendor/behat/mink/tests/Selector/fixtures/test.html
@@ -66,6 +66,8 @@
some content-text
</div>
+ <div>some "quoted" content</div>
+
<form>
<div id="test-for-field-selector">
<!-- match fields by `id` attribute -->
diff --git a/vendor/behat/mink/tests/SessionTest.php b/vendor/behat/mink/tests/SessionTest.php
index 9e6796d..3e0104a 100644
--- a/vendor/behat/mink/tests/SessionTest.php
+++ b/vendor/behat/mink/tests/SessionTest.php
@@ -130,6 +130,29 @@ class SessionTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($ret, $this->session->getResponseHeaders());
}
+ /**
+ * @dataProvider provideResponseHeader
+ */
+ public function testGetResponseHeader($expected, $name, array $headers)
+ {
+ $this->driver->expects($this->once())
+ ->method('getResponseHeaders')
+ ->willReturn($headers);
+
+ $this->assertSame($expected, $this->session->getResponseHeader($name));
+ }
+
+ public function provideResponseHeader()
+ {
+ return array(
+ array('test', 'Mink', array('Mink' => 'test')),
+ array('test', 'mink', array('Mink' => 'test')),
+ array('test', 'Mink', array('mink' => 'test')),
+ array('test', 'Mink', array('Mink' => array('test', 'test2'))),
+ array(null, 'other', array('Mink' => 'test')),
+ );
+ }
+
public function testSetCookie()
{
$this->driver->expects($this->once())
diff --git a/vendor/behat/mink/tests/WebAssertTest.php b/vendor/behat/mink/tests/WebAssertTest.php
index c3bd3cf..ef55d2d 100644
--- a/vendor/behat/mink/tests/WebAssertTest.php
+++ b/vendor/behat/mink/tests/WebAssertTest.php
@@ -21,6 +21,10 @@ class WebAssertTest extends \PHPUnit_Framework_TestCase
$this->session = $this->getMockBuilder('Behat\\Mink\\Session')
->disableOriginalConstructor()
->getMock();
+ $this->session->expects($this->any())
+ ->method('getDriver')
+ ->will($this->returnValue($this->getMock('Behat\Mink\Driver\DriverInterface')));
+
$this->assert = new WebAssert($this->session);
}
@@ -52,6 +56,23 @@ class WebAssertTest extends \PHPUnit_Framework_TestCase
$this->assertCorrectAssertion('addressEquals', array('/'));
}
+ public function testAddressEqualsEndingInScript()
+ {
+ $this->session
+ ->expects($this->exactly(2))
+ ->method('getCurrentUrl')
+ ->will($this->returnValue('http://example.com/script.php'))
+ ;
+
+ $this->assertCorrectAssertion('addressEquals', array('/script.php'));
+ $this->assertWrongAssertion(
+ 'addressEquals',
+ array('/'),
+ 'Behat\\Mink\\Exception\\ExpectationException',
+ 'Current page is "/script.php", but "/" expected.'
+ );
+ }
+
public function testAddressNotEquals()
{
$this->session
@@ -69,6 +90,23 @@ class WebAssertTest extends \PHPUnit_Framework_TestCase
);
}
+ public function testAddressNotEqualsEndingInScript()
+ {
+ $this->session
+ ->expects($this->exactly(2))
+ ->method('getCurrentUrl')
+ ->will($this->returnValue('http://example.com/script.php'))
+ ;
+
+ $this->assertCorrectAssertion('addressNotEquals', array('/'));
+ $this->assertWrongAssertion(
+ 'addressNotEquals',
+ array('/script.php'),
+ 'Behat\\Mink\\Exception\\ExpectationException',
+ 'Current page is "/script.php", but should not be.'
+ );
+ }
+
public function testAddressMatches()
{
$this->session
@@ -162,6 +200,132 @@ class WebAssertTest extends \PHPUnit_Framework_TestCase
);
}
+ public function testResponseHeaderEquals()
+ {
+ $this->session
+ ->expects($this->any())
+ ->method('getResponseHeader')
+ ->will($this->returnValueMap(
+ array(
+ array('foo', 'bar'),
+ array('bar', 'baz'),
+ )
+ ));
+
+ $this->assertCorrectAssertion('responseHeaderEquals', array('foo', 'bar'));
+ $this->assertWrongAssertion(
+ 'responseHeaderEquals',
+ array('bar', 'foo'),
+ 'Behat\\Mink\\Exception\\ExpectationException',
+ 'Current response header "bar" is "baz", but "foo" expected.'
+ );
+ }
+
+ public function testResponseHeaderNotEquals()
+ {
+ $this->session
+ ->expects($this->any())
+ ->method('getResponseHeader')
+ ->will($this->returnValueMap(
+ array(
+ array('foo', 'bar'),
+ array('bar', 'baz'),
+ )
+ ));
+
+ $this->assertCorrectAssertion('responseHeaderNotEquals', array('foo', 'baz'));
+ $this->assertWrongAssertion(
+ 'responseHeaderNotEquals',
+ array('bar', 'baz'),
+ 'Behat\\Mink\\Exception\\ExpectationException',
+ 'Current response header "bar" is "baz", but should not be.'
+ );
+ }
+
+ public function testResponseHeaderContains()
+ {
+ $this->session
+ ->expects($this->any())
+ ->method('getResponseHeader')
+ ->will($this->returnValueMap(
+ array(
+ array('foo', 'bar'),
+ array('bar', 'baz'),
+ )
+ ));
+
+ $this->assertCorrectAssertion('responseHeaderContains', array('foo', 'ba'));
+ $this->assertWrongAssertion(
+ 'responseHeaderContains',
+ array('bar', 'bz'),
+ 'Behat\\Mink\\Exception\\ExpectationException',
+ 'The text "bz" was not found anywhere in the "bar" response header.'
+ );
+ }
+
+ public function testResponseHeaderNotContains()
+ {
+ $this->session
+ ->expects($this->any())
+ ->method('getResponseHeader')
+ ->will($this->returnValueMap(
+ array(
+ array('foo', 'bar'),
+ array('bar', 'baz'),
+ )
+ ));
+
+ $this->assertCorrectAssertion('responseHeaderNotContains', array('foo', 'bz'));
+ $this->assertWrongAssertion(
+ 'responseHeaderNotContains',
+ array('bar', 'ba'),
+ 'Behat\\Mink\\Exception\\ExpectationException',
+ 'The text "ba" was found in the "bar" response header, but it should not.'
+ );
+ }
+
+ public function testResponseHeaderMatches()
+ {
+ $this->session
+ ->expects($this->any())
+ ->method('getResponseHeader')
+ ->will($this->returnValueMap(
+ array(
+ array('foo', 'bar'),
+ array('bar', 'baz'),
+ )
+ ));
+
+ $this->assertCorrectAssertion('responseHeaderMatches', array('foo', '/ba(.*)/'));
+ $this->assertWrongAssertion(
+ 'responseHeaderMatches',
+ array('bar', '/b[^a]/'),
+ 'Behat\\Mink\\Exception\\ExpectationException',
+ 'The pattern "/b[^a]/" was not found anywhere in the "bar" response header.'
+ );
+ }
+
+ public function testResponseHeaderNotMatches()
+ {
+ $this->session
+ ->expects($this->any())
+ ->method('getResponseHeader')
+ ->will($this->returnValueMap(
+ array(
+ array('foo', 'bar'),
+ array('bar', 'baz'),
+ )
+ ));
+
+ $this->assertCorrectAssertion('responseHeaderNotMatches', array('foo', '/bz/'));
+ $this->assertWrongAssertion(
+ 'responseHeaderNotMatches',
+ array('bar', '/b[ab]z/'),
+ 'Behat\\Mink\\Exception\\ExpectationException',
+ 'The pattern "/b[ab]z/" was found in the text of the "bar" response header, but it should not.'
+ );
+ }
+
public function testPageTextContains()
{
$page = $this->getMockBuilder('Behat\\Mink\\Element\\DocumentElement')
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index 8963b7e..bb43043 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -21,5 +21,4 @@ return array(
'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'),
'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'),
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'),
- 'Behat\\Mink\\Driver' => array($vendorDir . '/behat/mink-browserkit-driver/src'),
);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index 534894c..e360efb 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -40,6 +40,6 @@ return array(
'Drupal\\Core\\' => array($baseDir . '/core/lib/Drupal/Core'),
'Drupal\\Component\\' => array($baseDir . '/core/lib/Drupal/Component'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
- 'Behat\\Mink\\Driver\\' => array($vendorDir . '/behat/mink-goutte-driver/src'),
+ 'Behat\\Mink\\Driver\\' => array($vendorDir . '/behat/mink-browserkit-driver/src', $vendorDir . '/behat/mink-goutte-driver/src'),
'Behat\\Mink\\' => array($vendorDir . '/behat/mink/src'),
);
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 4b00b65..2b795e5 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -152,120 +152,6 @@
]
},
{
- "name": "behat/mink",
- "version": "v1.6.1",
- "version_normalized": "1.6.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/minkphp/Mink.git",
- "reference": "8b68523a339ec991bcd638b39dc8f04f808da88a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/minkphp/Mink/zipball/8b68523a339ec991bcd638b39dc8f04f808da88a",
- "reference": "8b68523a339ec991bcd638b39dc8f04f808da88a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.1",
- "symfony/css-selector": "~2.0"
- },
- "suggest": {
- "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)",
- "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation",
- "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)",
- "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)"
- },
- "time": "2015-02-04 17:02:06",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.6.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Behat\\Mink\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
- }
- ],
- "description": "Browser controller/emulator abstraction for PHP",
- "homepage": "http://mink.behat.org/",
- "keywords": [
- "browser",
- "testing",
- "web"
- ]
- },
- {
- "name": "behat/mink-browserkit-driver",
- "version": "v1.2.0",
- "version_normalized": "1.2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/minkphp/MinkBrowserKitDriver.git",
- "reference": "aed8f4a596b79014a75254c3e337511c33e38cbd"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/aed8f4a596b79014a75254c3e337511c33e38cbd",
- "reference": "aed8f4a596b79014a75254c3e337511c33e38cbd",
- "shasum": ""
- },
- "require": {
- "behat/mink": "~1.6@dev",
- "php": ">=5.3.1",
- "symfony/browser-kit": "~2.0",
- "symfony/dom-crawler": "~2.0"
- },
- "require-dev": {
- "silex/silex": "~1.2"
- },
- "time": "2014-09-26 11:35:19",
- "type": "mink-driver",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "Behat\\Mink\\Driver": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
- }
- ],
- "description": "Symfony2 BrowserKit driver for Mink framework",
- "homepage": "http://mink.behat.org/",
- "keywords": [
- "Mink",
- "Symfony2",
- "browser",
- "testing"
- ]
- },
- {
"name": "sebastian/diff",
"version": "1.3.0",
"version_normalized": "1.3.0.0",
@@ -582,60 +468,6 @@
]
},
{
- "name": "behat/mink-goutte-driver",
- "version": "dev-master",
- "version_normalized": "9999999-dev",
- "source": {
- "type": "git",
- "url": "https://github.com/minkphp/MinkGoutteDriver.git",
- "reference": "cc5ce119b5a8e06662f634b35967aff0b0c7dfdd"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/minkphp/MinkGoutteDriver/zipball/c8e254f127d6f2242b994afd4339fb62d471df3f",
- "reference": "cc5ce119b5a8e06662f634b35967aff0b0c7dfdd",
- "shasum": ""
- },
- "require": {
- "behat/mink": "~1.6@dev",
- "behat/mink-browserkit-driver": "~1.2@dev",
- "fabpot/goutte": "~1.0.4|~2.0|~3.1",
- "php": ">=5.3.1"
- },
- "time": "2015-06-27 00:15:11",
- "type": "mink-driver",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Behat\\Mink\\Driver\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
- }
- ],
- "description": "Goutte driver for Mink framework",
- "homepage": "http://mink.behat.org/",
- "keywords": [
- "browser",
- "goutte",
- "headless",
- "testing"
- ]
- },
- {
"name": "egulias/email-validator",
"version": "1.2.9",
"version_normalized": "1.2.9.0",
@@ -3627,5 +3459,180 @@
"zend",
"zikula"
]
+ },
+ {
+ "name": "behat/mink",
+ "version": "v1.7.0",
+ "version_normalized": "1.7.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/minkphp/Mink.git",
+ "reference": "6c129030ec2cc029905cf969a56ca8f087b2dfdf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/minkphp/Mink/zipball/6c129030ec2cc029905cf969a56ca8f087b2dfdf",
+ "reference": "6c129030ec2cc029905cf969a56ca8f087b2dfdf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.1",
+ "symfony/css-selector": "~2.1"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
+ },
+ "suggest": {
+ "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)",
+ "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation",
+ "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)",
+ "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)"
+ },
+ "time": "2015-09-20 20:24:03",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.7.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Behat\\Mink\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Browser controller/emulator abstraction for PHP",
+ "homepage": "http://mink.behat.org/",
+ "keywords": [
+ "browser",
+ "testing",
+ "web"
+ ]
+ },
+ {
+ "name": "behat/mink-browserkit-driver",
+ "version": "v1.3.0",
+ "version_normalized": "1.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/minkphp/MinkBrowserKitDriver.git",
+ "reference": "da47df1593dac132f04d24e7277ef40d33d9f201"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/da47df1593dac132f04d24e7277ef40d33d9f201",
+ "reference": "da47df1593dac132f04d24e7277ef40d33d9f201",
+ "shasum": ""
+ },
+ "require": {
+ "behat/mink": "~1.7@dev",
+ "php": ">=5.3.6",
+ "symfony/browser-kit": "~2.3",
+ "symfony/dom-crawler": "~2.3"
+ },
+ "require-dev": {
+ "silex/silex": "~1.2",
+ "symfony/phpunit-bridge": "~2.7"
+ },
+ "time": "2015-09-21 20:56:13",
+ "type": "mink-driver",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Behat\\Mink\\Driver\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Symfony2 BrowserKit driver for Mink framework",
+ "homepage": "http://mink.behat.org/",
+ "keywords": [
+ "Mink",
+ "Symfony2",
+ "browser",
+ "testing"
+ ]
+ },
+ {
+ "name": "behat/mink-goutte-driver",
+ "version": "v1.2.0",
+ "version_normalized": "1.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/minkphp/MinkGoutteDriver.git",
+ "reference": "c8e254f127d6f2242b994afd4339fb62d471df3f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/minkphp/MinkGoutteDriver/zipball/c8e254f127d6f2242b994afd4339fb62d471df3f",
+ "reference": "c8e254f127d6f2242b994afd4339fb62d471df3f",
+ "shasum": ""
+ },
+ "require": {
+ "behat/mink": "~1.6@dev",
+ "behat/mink-browserkit-driver": "~1.2@dev",
+ "fabpot/goutte": "~1.0.4|~2.0|~3.1",
+ "php": ">=5.3.1"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
+ },
+ "time": "2015-09-21 21:31:11",
+ "type": "mink-driver",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Behat\\Mink\\Driver\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Goutte driver for Mink framework",
+ "homepage": "http://mink.behat.org/",
+ "keywords": [
+ "browser",
+ "goutte",
+ "headless",
+ "testing"
+ ]
}
]