Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
4
vendor/behat/mink-goutte-driver/.gitignore
vendored
Normal file
4
vendor/behat/mink-goutte-driver/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
vendor
|
||||
composer.phar
|
||||
composer.lock
|
||||
phpunit.xml
|
27
vendor/behat/mink-goutte-driver/.travis.yml
vendored
Normal file
27
vendor/behat/mink-goutte-driver/.travis.yml
vendored
Normal file
|
@ -0,0 +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
|
||||
|
||||
install:
|
||||
- composer install
|
||||
|
||||
before_script:
|
||||
- export WEB_FIXTURES_HOST=http://localhost:8000
|
||||
|
||||
# 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
|
31
vendor/behat/mink-goutte-driver/CHANGELOG.md
vendored
Normal file
31
vendor/behat/mink-goutte-driver/CHANGELOG.md
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
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
|
||||
==================
|
||||
|
||||
The driver now relies on BrowserKitDriver 1.2.x, so all changes of this driver are relevant.
|
||||
The changes below only describe the changes related to GoutteDriver specifically.
|
||||
|
||||
New features:
|
||||
|
||||
* Added the possibility to use a normal Goutte client instead of requiring to use an extended one
|
||||
* Added the support of Goutte 2.0 as well
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Fixed the support of disabling basic auth
|
||||
* Fixed the resetting of the driver to reset the basic auth
|
||||
|
||||
Testing:
|
||||
|
||||
* Updated the testsuite to use the new Mink 1.6 driver testsuite
|
||||
* Added testing on HHVM
|
22
vendor/behat/mink-goutte-driver/LICENSE
vendored
Normal file
22
vendor/behat/mink-goutte-driver/LICENSE
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) 2012-2013 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
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
60
vendor/behat/mink-goutte-driver/README.md
vendored
Normal file
60
vendor/behat/mink-goutte-driver/README.md
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
Mink Goutte Driver
|
||||
==================
|
||||
|
||||
[](https://packagist.org/packages/behat/mink-goutte-driver)
|
||||
[](https://packagist.org/packages/behat/mink-goutte-driver)
|
||||
[](https://packagist.org/packages/behat/mink-goutte-driver)
|
||||
[](https://travis-ci.org/minkphp/MinkGoutteDriver)
|
||||
[](https://scrutinizer-ci.com/g/minkphp/MinkGoutteDriver/)
|
||||
[](https://scrutinizer-ci.com/g/minkphp/MinkGoutteDriver/)
|
||||
[](https://packagist.org/packages/behat/mink-goutte-driver)
|
||||
|
||||
Usage Example
|
||||
-------------
|
||||
|
||||
``` php
|
||||
<?php
|
||||
|
||||
require "vendor/autoload.php";
|
||||
|
||||
use Behat\Mink\Mink,
|
||||
Behat\Mink\Session,
|
||||
Behat\Mink\Driver\GoutteDriver,
|
||||
Behat\Mink\Driver\Goutte\Client as GoutteClient;
|
||||
|
||||
$mink = new Mink(array(
|
||||
'goutte' => new Session(new GoutteDriver(new GoutteClient())),
|
||||
));
|
||||
|
||||
$session = $mink->getSession('goutte');
|
||||
$session->visit("http://php.net/");
|
||||
$session->getPage()->clickLink('Downloads');
|
||||
echo $session->getCurrentUrl() . PHP_EOL;
|
||||
```
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Add a file composer.json with content:
|
||||
|
||||
``` json
|
||||
{
|
||||
"require": {
|
||||
"behat/mink": "~1.5",
|
||||
"behat/mink-goutte-driver": "~1.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
(or merge the above into your project's existing composer.json file)
|
||||
|
||||
``` bash
|
||||
$> curl -sS https://getcomposer.org/installer | php
|
||||
$> php composer.phar install
|
||||
```
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
|
||||
* Christophe Coevoet [stof](https://github.com/stof)
|
||||
* Other [awesome developers](https://github.com/minkphp/MinkGoutteDriver/graphs/contributors)
|
45
vendor/behat/mink-goutte-driver/composer.json
vendored
Normal file
45
vendor/behat/mink-goutte-driver/composer.json
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"name": "behat/mink-goutte-driver",
|
||||
"description": "Goutte driver for Mink framework",
|
||||
"keywords": ["goutte", "headless", "testing", "browser"],
|
||||
"homepage": "http://mink.behat.org/",
|
||||
"type": "mink-driver",
|
||||
"license": "MIT",
|
||||
|
||||
"authors": [
|
||||
{
|
||||
"name": "Konstantin Kudryashov",
|
||||
"email": "ever.zet@gmail.com",
|
||||
"homepage": "http://everzet.com"
|
||||
}
|
||||
],
|
||||
|
||||
"require": {
|
||||
"php": ">=5.3.1",
|
||||
"behat/mink": "~1.6@dev",
|
||||
"behat/mink-browserkit-driver": "~1.2@dev",
|
||||
"fabpot/goutte": "~1.0.4|~2.0|~3.1"
|
||||
},
|
||||
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7"
|
||||
},
|
||||
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Behat\\Mink\\Driver\\": "src/"
|
||||
}
|
||||
},
|
||||
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Behat\\Mink\\Tests\\Driver\\": "tests"
|
||||
}
|
||||
},
|
||||
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
23
vendor/behat/mink-goutte-driver/phpunit.xml.dist
vendored
Normal file
23
vendor/behat/mink-goutte-driver/phpunit.xml.dist
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit colors="true" bootstrap="vendor/behat/mink/driver-testsuite/bootstrap.php">
|
||||
<testsuites>
|
||||
<testsuite name="Driver test suite">
|
||||
<directory>tests</directory>
|
||||
<directory>vendor/behat/mink/driver-testsuite/tests/Basic</directory>
|
||||
<directory>vendor/behat/mink/driver-testsuite/tests/Form</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<php>
|
||||
<var name="driver_config_factory" value="Behat\Mink\Tests\Driver\GoutteConfig::getInstance" />
|
||||
|
||||
<!--server name="WEB_FIXTURES_HOST" value="http://test.mink.dev" /-->
|
||||
</php>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>./src</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
43
vendor/behat/mink-goutte-driver/src/Goutte/Client.php
vendored
Normal file
43
vendor/behat/mink-goutte-driver/src/Goutte/Client.php
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Behat\Mink.
|
||||
* (c) Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Behat\Mink\Driver\Goutte;
|
||||
|
||||
use Goutte\Client as BaseClient;
|
||||
use Symfony\Component\BrowserKit\Response;
|
||||
|
||||
/**
|
||||
* Client overrides to support Mink functionality.
|
||||
*/
|
||||
class Client extends BaseClient
|
||||
{
|
||||
/**
|
||||
* Reads response meta tags to guess content-type charset.
|
||||
*
|
||||
* @param Response $response
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
protected function filterResponse($response)
|
||||
{
|
||||
$contentType = $response->getHeader('Content-Type');
|
||||
|
||||
if (!$contentType || false === strpos($contentType, 'charset=')) {
|
||||
if (preg_match('/\<meta[^\>]+charset *= *["\']?([a-zA-Z\-0-9]+)/i', $response->getContent(), $matches)) {
|
||||
$headers = $response->getHeaders();
|
||||
$headers['Content-Type'] = $contentType.';charset='.$matches[1];
|
||||
|
||||
$response = new Response($response->getContent(), $response->getStatus(), $headers);
|
||||
}
|
||||
}
|
||||
|
||||
return parent::filterResponse($response);
|
||||
}
|
||||
}
|
75
vendor/behat/mink-goutte-driver/src/GoutteDriver.php
vendored
Normal file
75
vendor/behat/mink-goutte-driver/src/GoutteDriver.php
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Behat\Mink.
|
||||
* (c) Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Behat\Mink\Driver;
|
||||
|
||||
use Behat\Mink\Driver\Goutte\Client as ExtendedClient;
|
||||
use Goutte\Client;
|
||||
|
||||
/**
|
||||
* Goutte driver.
|
||||
*
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*/
|
||||
class GoutteDriver extends BrowserKitDriver
|
||||
{
|
||||
/**
|
||||
* Initializes Goutte driver.
|
||||
*
|
||||
* @param Client $client Goutte client instance
|
||||
*/
|
||||
public function __construct(Client $client = null)
|
||||
{
|
||||
parent::__construct($client ?: new ExtendedClient());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setBasicAuth($user, $password)
|
||||
{
|
||||
if (false === $user) {
|
||||
$this->getClient()->resetAuth();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->getClient()->setAuth($user, $password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Goutte client.
|
||||
*
|
||||
* The method is overwritten only to provide the appropriate return type hint.
|
||||
*
|
||||
* @return Client
|
||||
*/
|
||||
public function getClient()
|
||||
{
|
||||
return parent::getClient();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
parent::reset();
|
||||
$this->getClient()->resetAuth();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function prepareUrl($url)
|
||||
{
|
||||
return $url;
|
||||
}
|
||||
}
|
27
vendor/behat/mink-goutte-driver/tests/Custom/InstantiationTest.php
vendored
Normal file
27
vendor/behat/mink-goutte-driver/tests/Custom/InstantiationTest.php
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace Behat\Mink\Tests\Driver\Custom;
|
||||
|
||||
use Behat\Mink\Driver\GoutteDriver;
|
||||
|
||||
class InstantiationTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testInstantiateWithClient()
|
||||
{
|
||||
$client = $this->getMockBuilder('Goutte\Client')->disableOriginalConstructor()->getMock();
|
||||
$client->expects($this->once())
|
||||
->method('followRedirects')
|
||||
->with(true);
|
||||
|
||||
$driver = new GoutteDriver($client);
|
||||
|
||||
$this->assertSame($client, $driver->getClient());
|
||||
}
|
||||
|
||||
public function testInstantiateWithoutClient()
|
||||
{
|
||||
$driver = new GoutteDriver();
|
||||
|
||||
$this->assertInstanceOf('Behat\Mink\Driver\Goutte\Client', $driver->getClient());
|
||||
}
|
||||
}
|
26
vendor/behat/mink-goutte-driver/tests/GoutteConfig.php
vendored
Normal file
26
vendor/behat/mink-goutte-driver/tests/GoutteConfig.php
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace Behat\Mink\Tests\Driver;
|
||||
|
||||
use Behat\Mink\Driver\GoutteDriver;
|
||||
|
||||
class GoutteConfig extends AbstractConfig
|
||||
{
|
||||
public static function getInstance()
|
||||
{
|
||||
return new self();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createDriver()
|
||||
{
|
||||
return new GoutteDriver();
|
||||
}
|
||||
|
||||
protected function supportsJs()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
Reference in a new issue