Update Mink from 1.7.1 to 1.8.1 in acceptance tests

Since version 1.8.0 of Mink "Mink::getSession()" no longer starts the
session automatically (see https://github.com/minkphp/Mink/pull/705), so
it now needs to be explicitly started.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2021-01-18 00:24:47 +01:00 committed by John Molakvoæ (skjnldsv)
parent 7625a87412
commit f216b9307a
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
3 changed files with 24 additions and 17 deletions

View File

@ -1,7 +1,7 @@
{ {
"require-dev": { "require-dev": {
"behat/behat": "3.8.1", "behat/behat": "3.8.1",
"behat/mink": "1.7.1", "behat/mink": "1.8.1",
"behat/mink-extension": "2.3.1", "behat/mink-extension": "2.3.1",
"behat/mink-selenium2-driver": "1.4.0", "behat/mink-selenium2-driver": "1.4.0",
"phpunit/phpunit": "6.5.14" "phpunit/phpunit": "6.5.14"

View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "23dccfe6d77917642d1be256dc842b55", "content-hash": "d2c44a0ea2452a05e7f45d8ca6ef0387",
"packages": [], "packages": [],
"packages-dev": [ "packages-dev": [
{ {
@ -148,35 +148,38 @@
}, },
{ {
"name": "behat/mink", "name": "behat/mink",
"version": "v1.7.1", "version": "v1.8.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/minkphp/Mink.git", "url": "https://github.com/minkphp/Mink.git",
"reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9" "reference": "07c6a9fe3fa98c2de074b25d9ed26c22904e3887"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/minkphp/Mink/zipball/e6930b9c74693dff7f4e58577e1b1743399f3ff9", "url": "https://api.github.com/repos/minkphp/Mink/zipball/07c6a9fe3fa98c2de074b25d9ed26c22904e3887",
"reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9", "reference": "07c6a9fe3fa98c2de074b25d9ed26c22904e3887",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.1", "php": ">=5.3.1",
"symfony/css-selector": "~2.1|~3.0" "symfony/css-selector": "^2.7|^3.0|^4.0|^5.0"
}, },
"require-dev": { "require-dev": {
"symfony/phpunit-bridge": "~2.7|~3.0" "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20",
"symfony/debug": "^2.7|^3.0|^4.0",
"symfony/phpunit-bridge": "^3.4.38 || ^5.0.5"
}, },
"suggest": { "suggest": {
"behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)", "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-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-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)" "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)",
"dmore/chrome-mink-driver": "fast and JS-enabled driver for any app (requires chromium or google chrome)"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.7.x-dev" "dev-master": "1.8.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -202,7 +205,7 @@
"testing", "testing",
"web" "web"
], ],
"time": "2016-03-05T08:26:18+00:00" "time": "2020-03-11T15:45:53+00:00"
}, },
{ {
"name": "behat/mink-extension", "name": "behat/mink-extension",
@ -2027,20 +2030,20 @@
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v3.4.47", "version": "v5.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
"reference": "da3d9da2ce0026771f5fe64cb332158f1bd2bc33" "reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/da3d9da2ce0026771f5fe64cb332158f1bd2bc33", "url": "https://api.github.com/repos/symfony/css-selector/zipball/f789e7ead4c79e04ca9a6d6162fc629c89bd8054",
"reference": "da3d9da2ce0026771f5fe64cb332158f1bd2bc33", "reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.5.9|>=7.0.8" "php": ">=7.2.5"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -2071,7 +2074,7 @@
], ],
"description": "Symfony CssSelector Component", "description": "Symfony CssSelector Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-10-24T10:57:07+00:00" "time": "2020-12-08T17:02:38+00:00"
}, },
{ {
"name": "symfony/dependency-injection", "name": "symfony/dependency-injection",

View File

@ -135,6 +135,8 @@ class ActorContext extends RawMinkContext {
$this->actors = []; $this->actors = [];
$this->sharedNotebook = []; $this->sharedNotebook = [];
$this->getSession()->start();
$this->actors["default"] = new Actor("default", $this->getSession(), $this->getMinkParameter("base_url"), $this->sharedNotebook); $this->actors["default"] = new Actor("default", $this->getSession(), $this->getMinkParameter("base_url"), $this->sharedNotebook);
$this->actors["default"]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier); $this->actors["default"]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier);
@ -159,6 +161,8 @@ class ActorContext extends RawMinkContext {
*/ */
public function iActAs($actorName) { public function iActAs($actorName) {
if (!array_key_exists($actorName, $this->actors)) { if (!array_key_exists($actorName, $this->actors)) {
$this->getSession($actorName)->start();
$this->actors[$actorName] = new Actor($actorName, $this->getSession($actorName), $this->getMinkParameter("base_url"), $this->sharedNotebook); $this->actors[$actorName] = new Actor($actorName, $this->getSession($actorName), $this->getMinkParameter("base_url"), $this->sharedNotebook);
$this->actors[$actorName]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier); $this->actors[$actorName]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier);
} }