diff --git a/composer.lock b/composer.lock
index d87cede..d52e349 100644
--- a/composer.lock
+++ b/composer.lock
@@ -2195,6 +2195,145 @@
],
"packages-dev": [
{
+ "name": "behat/behat",
+ "version": "v3.0.15",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/Behat.git",
+ "reference": "b35ae3d45332d80c532af69cc36f780a9397a996"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/Behat/zipball/b35ae3d45332d80c532af69cc36f780a9397a996",
+ "reference": "b35ae3d45332d80c532af69cc36f780a9397a996",
+ "shasum": ""
+ },
+ "require": {
+ "behat/gherkin": "~4.3",
+ "behat/transliterator": "~1.0",
+ "ext-mbstring": "*",
+ "php": ">=5.3.3",
+ "symfony/class-loader": "~2.1",
+ "symfony/config": "~2.3",
+ "symfony/console": "~2.1",
+ "symfony/dependency-injection": "~2.1",
+ "symfony/event-dispatcher": "~2.1",
+ "symfony/translation": "~2.3",
+ "symfony/yaml": "~2.1"
+ },
+ "require-dev": {
+ "phpspec/prophecy-phpunit": "~1.0",
+ "phpunit/phpunit": "~4.0",
+ "symfony/process": "~2.1"
+ },
+ "suggest": {
+ "behat/mink-extension": "for integration with Mink testing framework",
+ "behat/symfony2-extension": "for integration with Symfony2 web framework",
+ "behat/yii-extension": "for integration with Yii web framework"
+ },
+ "bin": [
+ "bin/behat"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Behat\\Behat": "src/",
+ "Behat\\Testwork": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Scenario-oriented BDD framework for PHP 5.3",
+ "homepage": "http://behat.org/",
+ "keywords": [
+ "Agile",
+ "BDD",
+ "ScenarioBDD",
+ "Scrum",
+ "StoryBDD",
+ "User story",
+ "business",
+ "development",
+ "documentation",
+ "examples",
+ "symfony",
+ "testing"
+ ],
+ "time": "2015-02-22 14:10:33"
+ },
+ {
+ "name": "behat/gherkin",
+ "version": "v4.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/Gherkin.git",
+ "reference": "6b3f8cf3560dc4909c4cddd4f1af3e1f6e9d80af"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/Gherkin/zipball/6b3f8cf3560dc4909c4cddd4f1af3e1f6e9d80af",
+ "reference": "6b3f8cf3560dc4909c4cddd4f1af3e1f6e9d80af",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0",
+ "symfony/yaml": "~2.1"
+ },
+ "suggest": {
+ "symfony/yaml": "If you want to parse features, represented in YAML files"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Behat\\Gherkin": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Gherkin DSL parser for PHP 5.3",
+ "homepage": "http://behat.org/",
+ "keywords": [
+ "BDD",
+ "Behat",
+ "Cucumber",
+ "DSL",
+ "gherkin",
+ "parser"
+ ],
+ "time": "2015-09-29 13:41:19"
+ },
+ {
"name": "behat/mink",
"version": "v1.6.1",
"source": {
@@ -2305,6 +2444,65 @@
"time": "2014-09-26 11:35:19"
},
{
+ "name": "behat/mink-extension",
+ "version": "v2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/MinkExtension.git",
+ "reference": "06e2b99d92e175719d7e841d5be16b7df1a233c5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/MinkExtension/zipball/06e2b99d92e175719d7e841d5be16b7df1a233c5",
+ "reference": "06e2b99d92e175719d7e841d5be16b7df1a233c5",
+ "shasum": ""
+ },
+ "require": {
+ "behat/behat": "~3.0,>=3.0.5",
+ "behat/mink": "~1.5",
+ "php": ">=5.3.2",
+ "symfony/config": "~2.2"
+ },
+ "require-dev": {
+ "behat/mink-goutte-driver": "~1.1",
+ "phpspec/phpspec": "~2.0"
+ },
+ "type": "behat-extension",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Behat\\MinkExtension": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Christophe Coevoet",
+ "email": "stof@notk.org"
+ },
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com"
+ }
+ ],
+ "description": "Mink extension for Behat",
+ "homepage": "http://extensions.behat.org/mink",
+ "keywords": [
+ "browser",
+ "gui",
+ "test",
+ "web"
+ ],
+ "time": "2015-09-29 17:42:41"
+ },
+ {
"name": "behat/mink-goutte-driver",
"version": "dev-master",
"source": {
@@ -2357,6 +2555,46 @@
"time": "2015-06-27 00:15:11"
},
{
+ "name": "behat/transliterator",
+ "version": "v1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/Transliterator.git",
+ "reference": "868e05be3a9f25ba6424c2dd4849567f50715003"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/Transliterator/zipball/868e05be3a9f25ba6424c2dd4849567f50715003",
+ "reference": "868e05be3a9f25ba6424c2dd4849567f50715003",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Behat\\Transliterator": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Artistic-1.0"
+ ],
+ "description": "String transliterator",
+ "keywords": [
+ "i18n",
+ "slug",
+ "transliterator"
+ ],
+ "time": "2015-09-28 16:26:35"
+ },
+ {
"name": "doctrine/instantiator",
"version": "1.0.5",
"source": {
@@ -2460,6 +2698,140 @@
"time": "2015-08-29 16:16:56"
},
{
+ "name": "jcalderonzumba/gastonjs",
+ "version": "dev-guzzle6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/dawehner/gastonjs.git",
+ "reference": "31c4bdb076d5d839dd5005810e12533091c603db"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/dawehner/gastonjs/zipball/31c4bdb076d5d839dd5005810e12533091c603db",
+ "reference": "31c4bdb076d5d839dd5005810e12533091c603db",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/guzzle": "~6.0",
+ "php": ">=5.4"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.6",
+ "silex/silex": "~1.2",
+ "symfony/phpunit-bridge": "~2.7",
+ "symfony/process": "~2.1"
+ },
+ "type": "phantomjs-api",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zumba\\GastonJS\\": "src"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Zumba\\GastonJS\\Tests\\": "tests/unit"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Juan Francisco Calderón Zumba",
+ "email": "juanfcz@gmail.com",
+ "homepage": "http://github.com/jcalderonzumba"
+ }
+ ],
+ "description": "PhantomJS API based server for webpage automation",
+ "homepage": "https://github.com/jcalderonzumba/gastonjs",
+ "keywords": [
+ "api",
+ "automation",
+ "browser",
+ "headless",
+ "phantomjs"
+ ],
+ "support": {
+ "source": "https://github.com/dawehner/gastonjs/tree/guzzle6"
+ },
+ "time": "2015-10-04 12:41:08"
+ },
+ {
+ "name": "jcalderonzumba/mink-phantomjs-driver",
+ "version": "dev-guzzle6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/dawehner/MinkPhantomJSDriver.git",
+ "reference": "ee72b461f0d9c4277f3da0bfe596b22542294e97"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/dawehner/MinkPhantomJSDriver/zipball/ee72b461f0d9c4277f3da0bfe596b22542294e97",
+ "reference": "ee72b461f0d9c4277f3da0bfe596b22542294e97",
+ "shasum": ""
+ },
+ "require": {
+ "behat/mink": "~1.6",
+ "behat/mink-extension": "~2.0",
+ "guzzlehttp/guzzle": "~6.0",
+ "jcalderonzumba/gastonjs": "dev-guzzle6",
+ "php": ">=5.4",
+ "twig/twig": "~1.8"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.6",
+ "silex/silex": "~1.2",
+ "symfony/css-selector": "~2.1",
+ "symfony/phpunit-bridge": "~2.7",
+ "symfony/process": "~2.3"
+ },
+ "type": "mink-driver",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.4.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zumba\\Mink\\Driver\\": "src"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Behat\\Mink\\Tests\\Driver\\": "tests/integration"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Juan Francisco Calderón Zumba",
+ "email": "juanfcz@gmail.com",
+ "homepage": "http://github.com/jcalderonzumba"
+ }
+ ],
+ "description": "PhantomJS driver for Mink framework",
+ "homepage": "http://mink.behat.org/",
+ "keywords": [
+ "ajax",
+ "browser",
+ "headless",
+ "javascript",
+ "phantomjs",
+ "testing"
+ ],
+ "support": {
+ "source": "https://github.com/dawehner/MinkPhantomJSDriver/tree/guzzle6"
+ },
+ "time": "2015-10-04 13:57:04"
+ },
+ {
"name": "mikey179/vfsStream",
"version": "v1.5.0",
"source": {
@@ -3409,6 +3781,56 @@
"time": "2015-09-06 08:36:38"
},
{
+ "name": "symfony/config",
+ "version": "v2.7.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/config.git",
+ "reference": "9698fdf0a750d6887d5e7729d5cf099765b20e61"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/config/zipball/9698fdf0a750d6887d5e7729d5cf099765b20e61",
+ "reference": "9698fdf0a750d6887d5e7729d5cf099765b20e61",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9",
+ "symfony/filesystem": "~2.3"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Config\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Config Component",
+ "homepage": "https://symfony.com",
+ "time": "2015-09-21 15:02:29"
+ },
+ {
"name": "symfony/css-selector",
"version": "v2.7.4",
"source": {
@@ -3513,6 +3935,55 @@
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2015-08-26 10:48:03"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "v2.7.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/filesystem.git",
+ "reference": "a17f8a17c20e8614c15b8e116e2f4bcde102cfab"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/a17f8a17c20e8614c15b8e116e2f4bcde102cfab",
+ "reference": "a17f8a17c20e8614c15b8e116e2f4bcde102cfab",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Filesystem\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Filesystem Component",
+ "homepage": "https://symfony.com",
+ "time": "2015-09-09 17:42:36"
}
],
"aliases": [],
@@ -3547,7 +4018,8 @@
"behat/mink-goutte-driver": 20,
"mikey179/vfsstream": 0,
"phpunit/phpunit": 0,
- "symfony/css-selector": 0
+ "symfony/css-selector": 0,
+ "jcalderonzumba/mink-phantomjs-driver": 20
},
"prefer-stable": true,
"prefer-lowest": false,
diff --git a/core/composer.json b/core/composer.json
index 78ef4f7..fe45482 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -35,8 +35,19 @@
"behat/mink-goutte-driver": "dev-master#cc5ce119b5a8e06662f634b35967aff0b0c7dfdd",
"mikey179/vfsStream": "~1.2",
"phpunit/phpunit": "4.8.*",
- "symfony/css-selector": "2.7.*"
+ "symfony/css-selector": "2.7.*",
+ "jcalderonzumba/mink-phantomjs-driver": "dev-guzzle6"
},
+ "repositories": [
+ {
+ "type": "vcs",
+ "url": "https://github.com/dawehner/MinkPhantomJSDriver.git"
+ },
+ {
+ "type": "vcs",
+ "url": "https://github.com/dawehner/gastonjs.git"
+ }
+ ],
"replace": {
"drupal/action": "self.version",
"drupal/aggregator": "self.version",
diff --git a/core/modules/simpletest/src/BrowserTestBase.php b/core/modules/simpletest/src/BrowserTestBase.php
index e5712c1..ccd3368 100644
--- a/core/modules/simpletest/src/BrowserTestBase.php
+++ b/core/modules/simpletest/src/BrowserTestBase.php
@@ -25,6 +25,7 @@
use Drupal\Core\Test\TestRunnerKernel;
use Drupal\user\UserInterface;
use Symfony\Component\HttpFoundation\Request;
+use Zumba\Mink\Driver\PhantomJSDriver;
/**
* Provides a test case for functional Drupal tests.
@@ -188,15 +189,34 @@
protected $mink;
/**
+ * The base URL.
+ *
+ * @var string
+ */
+ protected $baseUrl;
+
+ /**
* Initializes Mink sessions.
*/
protected function initMink() {
- $driver = new GoutteDriver();
+ $path = '/tmp/browsertestbase-templatecache';
+ if (!file_exists($path)) {
+ mkdir($path);
+ }
+ $driver = new PhantomJSDriver(getenv("DRIVER_URL"), $path);
$session = new Session($driver);
$this->mink = new Mink();
$this->mink->registerSession('goutte', $session);
$this->mink->setDefaultSessionName('goutte');
$this->registerSessions();
+
+ // Fire up the first request to the front page in order to be able to set
+ // a cookie later.
+ // @fixme This is done to circumvent:
+ // WebDriver\Exception\UnableToSetCookie: {"errorMessage":"Unable to set Cookie: no URL has been loaded yet","request":{"headers":{"Accept":"application/json;charset=UTF-8","Content-Length":"164","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:8910"},"httpVersion":"1.1","method":"POST","post":"{\"cookie\":{\"name\":\"SIMPLETEST_USER_AGENT\",\"value\":\"simpletest472558;1441488302;55eb5dae78eeb7.36607058;IxhRvB7dhbDAMurfBshqgUwEOpAPPKybnJMv0JgaG8Q\",\"secure\":false}}","url":"/cookie","urlParsed":{"anchor":"","query":"","file":"cookie","directory":"/","path":"/cookie","relative":"/cookie","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/cookie","queryKey":{},"chunks":["cookie"]},"urlOriginal":"/session/91aef6b0-5414-11e5-9028-67c7fcbbdc3b/cookie"}}
+ $session = $this->getSession();
+ $session->visit($this->baseUrl);
+
return $session;
}
@@ -237,6 +257,8 @@ protected function setUp() {
$path = isset($parsed_url['path']) ? rtrim(rtrim($parsed_url['path']), '/') : '';
$port = isset($parsed_url['port']) ? $parsed_url['port'] : 80;
+ $this->baseUrl = $base_url;
+
// If the passed URL schema is 'https' then setup the $_SERVER variables
// properly so that testing will run under HTTPS.
if ($parsed_url['scheme'] === 'https') {
diff --git a/core/phpunit.xml.dist b/core/phpunit.xml.dist
index 31169cd..b2d6fe7 100644
--- a/core/phpunit.xml.dist
+++ b/core/phpunit.xml.dist
@@ -10,6 +10,8 @@
+
+
diff --git a/vendor/behat/behat/.scrutinizer.yml b/vendor/behat/behat/.scrutinizer.yml
new file mode 100644
index 0000000..a957ea4
--- /dev/null
+++ b/vendor/behat/behat/.scrutinizer.yml
@@ -0,0 +1,21 @@
+checks:
+ php:
+ code_rating: true
+ duplication: true
+
+tools:
+ external_code_coverage: false
+ php_code_coverage: false
+ php_code_sniffer:
+ config: { standard: 'PSR1' }
+ php_changetracking: true
+ php_cpd: true
+ php_cs_fixer:
+ config: { level: 'psr1' }
+ php_mess_detector: true
+ php_pdepend: true
+ php_analyzer: true
+ sensiolabs_security_checker: true
+
+filter:
+ paths: [ 'src/*' ]
diff --git a/vendor/behat/behat/.travis.yml b/vendor/behat/behat/.travis.yml
new file mode 100644
index 0000000..26792bb
--- /dev/null
+++ b/vendor/behat/behat/.travis.yml
@@ -0,0 +1,36 @@
+language: php
+
+php: [5.3, 5.4, 5.5, 5.6, 5.3.3, hhvm]
+
+sudo: false
+
+cache:
+ directories:
+ - $HOME/.composer/cache
+
+branches:
+ except:
+ - /^bugfix\/.*$/
+ - /^feature\/.*$/
+ - /^optimization\/.*$/
+
+matrix:
+ include:
+ - php: 5.5
+ env: SYMFONY_VERSION='2.3.*'
+ - php: 5.5
+ env: SYMFONY_VERSION='2.5.*'
+ - php: 5.3.3
+ env: DEPENDENCIES='low'
+
+before_script:
+ - composer selfupdate
+ - if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;
+ - if [ "$DEPENDENCIES" != "low" ]; then composer update; fi;
+ - if [ "$DEPENDENCIES" = "low" ]; then composer update --prefer-lowest; fi;
+ - export PATH=./bin:$PATH
+ - echo " php_version_tags.php
+
+script:
+ - phpunit
+ - behat -fprogress --strict --tags '~@php-version,'`php php_version_tags.php`
diff --git a/vendor/behat/behat/CHANGES.md b/vendor/behat/behat/CHANGES.md
new file mode 100644
index 0000000..c59255b
--- /dev/null
+++ b/vendor/behat/behat/CHANGES.md
@@ -0,0 +1,793 @@
+3.0.15 / 2015-02-22
+===================
+
+ * Fix broken null-transformations (Issue #669)
+ * Improve exception messages (thanks @dantleech)
+
+3.0.14 / 2014-09-23
+===================
+
+ * Improve generated context class
+
+3.0.13 / 2014-08-28
+===================
+
+ * Add support for typehinted parameters
+ * Allow any whitespace characters at the end of context class
+ * Fix scenario with decimal number following string in Turnip pattern
+ * Fix scenario with empty string in step with Turnip pattern
+ * Fix scenario where step has slashes in Turnip pattern
+
+3.0.12 / 2014-07-17
+===================
+
+ * Fix remaining issues with the definition arguments parsing
+ * Introduce `Testwork\Argument` component
+
+3.0.11 / 2014-07-09
+===================
+
+ * Fix argument resolution for functions with default values (thanks @alesblaznik)
+ * Fix step colouring of internationalised definitions
+ * Refactor `ContextFactory` and `RepositorySearchEngine` arguments resolution into the new
+ Testwork component - `ArgumentResolver`
+
+3.0.10 / 2014-06-29
+===================
+
+ * Fix argument resolution when named arguments used and method has defaults (thanks @WouterJ)
+ * Fix support for decimal numbers in turnip placeholders
+
+3.0.9 / 2014-06-20
+==================
+
+ * Fix definition translations reading bug with multi-suite configurations (thanks @WouterJ for reporting)
+ * Fix pretty printer bug with failing background and 2 scenarios (thanks @andytson for reporting)
+ * Fix memory footprint calculation (thanks @dready for reporting)
+
+3.0.8 / 2014-06-06
+==================
+
+ * Profile level Gherkin filters are now overridable by CLI filter options
+ * Rerun cache path is now configurable
+ * Fix turnip-based step definitions starting from token
+ * Fix token-based transformations interfering with regex-based ones
+ * Rerun cache dump have been optimised
+
+3.0.7 / 2014-05-27
+==================
+
+ * Properly generate keywords in snippets for non-english and `And`, `But` steps (thanks @kibao)
+ * Fix regex check bug with transformations that return objects (thanks @vaidasm)
+ * Return ability to use custom formatters by specifiying their class names
+
+3.0.6 / 2014-05-06
+==================
+
+ * Fix a small extension registration shortcut issue introduced in previous release (thanks @FrenkyNet)
+
+3.0.5 / 2014-05-06
+==================
+
+ * Fix a suite initialization bug when suite contexts have arguments
+ * Fix wrong handling of an empty `behat.yml`
+ * Explicitly fail when provided context argument is not supported by constructor
+ * Fix extension registration shortcut for 3rd-part plugins
+
+3.0.4 / 2014-04-29
+==================
+
+ * Make sure that `Before*Tested` is always executed before `Before*` hooks
+ * Introduce additional `After*Setup` and `Before*Teardown` events
+ * Improved the error reporting for invalid regexes in step definitions (thanks @stof)
+
+3.0.3 / 2014-04-27
+==================
+
+ * Support definition transformations without capture groups
+ * Override gherkin filters in custom profiles instead of merging them
+ * Refactored the handling of colors to set them earlier
+ ([#513](https://github.com/Behat/Behat/pull/513) thanks to @stof)
+
+3.0.2 / 2014-04-26
+==================
+
+ * Fix warning on empty scenarios
+
+3.0.1 / 2014-04-26
+==================
+
+ * Make sure that `AfterStep` hook is running even if step is failed
+ ([504](https://github.com/Behat/Behat/issues/504))
+ * Optimised the way service wrappers are registered (thanks @stof)
+
+3.0.0 / 2014-04-20
+==================
+
+ * Brand new highly extendable and clear architecture
+ * Support for multiple suites per profile
+ * Support for multiple contexts per suite
+ * Support for multiple feature paths per suite
+ * Support for filtered suites
+ * Support for unique context constructor parameters
+ * Hooks are first class citizens and thus have their own error and output buffering
+ * Turnip syntax in definitions
+ * Reworked formatters with improved error and output buffering
+ * Rerun does not require precache run
+ * New gherkin role filter
+ * Improved error handling with 3 levels of error reporting (-v, -vv, -vvv)
+ * Dropped subcontexts
+ * Dropped chained steps
+ * Dropped closured definitions
+
+3.0.0rc3 / 2014-03-16
+=======================
+
+ * Multiline step description support ([082da36b7db2525700287616babe982e485330d1](https://github.com/Behat/Behat/commit/082da36b7db2525700287616babe982e485330d1))
+ * Added ability to choose all 3 verbosity levels and moved stack traces to the 2nd one ([d550f72d6aa49f0f87a6ce0e50721356a5d04c45](https://github.com/Behat/Behat/commit/d550f72d6aa49f0f87a6ce0e50721356a5d04c45))
+ * Renamed Subject to Specification ([#447](https://github.com/Behat/Behat/pull/447))
+ * Refactored ContextSnippetGenerator ([#445](https://github.com/Behat/Behat/pull/445))
+ * Refactored context arguments handling ([#446](https://github.com/Behat/Behat/pull/446))
+ * Refactored testers to use composition over inheritance and added setUp/tearDown phase to them ([#457](https://github.com/Behat/Behat/pull/457))
+ * Refactored output formatters to be chain of event listeners
+ * Refactored hooks to use [scopes](https://github.com/Behat/Behat/tree/3.0/src/Behat/Behat/Hook/Scope) instead of events
+ * Fixed the GroupedSubjectIterator when dealing with an empty iterator ([2c1312780d610f01116ac42fb958c0c09a64c041](https://github.com/Behat/Behat/commit/2c1312780d610f01116ac42fb958c0c09a64c041))
+ * Forced the paths.base to use a real path all the time ([b4477d7cf3f9550874c609d4edc5a4f55390672c](https://github.com/Behat/Behat/commit/b4477d7cf3f9550874c609d4edc5a4f55390672c))
+
+3.0.0rc2 / 2014-01-10
+=======================
+
+ * Fixed progress formatter hooks support
+ * Reintroduced suite hooks (with an additional functionality of name filtering)
+ * Behat tells about steps that it couldn't generate snippets for
+ * Memory consumption optimizations
+ * Fixed contexts inheritance
+ * New formatter translations
+
+ * Added constructor arguments and class resolving extension points to context creation routine
+ * Simplified and cleaned `Context` package of the Behat
+ * Minor public API changes across the board (simplification)
+ * Optimized subject finding routine and cleaned extension points (`SubjectLocator`)
+ * Both `ExampleTested` and `ScenarioTested` now use same method name - `getScenario()`
+ * Added exception accessors to `StepTestResult`
+ * Renamed `ExerciseTester` to `Exercise`
+ * Added `HookableEvent` to Testwork, which extends `LifecycleEvent`
+ * Made `priority` attribute of a tag optional
+ * Changed all occurrences of `classname` to `class` across public API
+ * Renamed `GherkinSuite` to `GenericSuite` and moved it into the Testwork
+ * Added `initialize` call to extension lifecycle and Extension interface
+ * Renamed some extensions config keys to be more intuitive
+
+3.0.0rc1 / 2014-01-01
+=======================
+
+ * New layered and highly extendable architecture
+ * Standard output buffering of definitions and hooks
+ * Hooks as first class citizens
+ * New pretty and progress formatters
+ * Huge speed and memory footprint improvements
+ * Moved 40% of non-Behat related codebase into a shared foundation called Testwork
+
+3.0.0beta8 / 2013-10-01
+=======================
+
+ * Add `*SnippetsFriendlyInterface`(s) that are now required to generate snippets
+ * Add support for turnip-style definitions
+ * Use turnip-style definitions by default from `--init`
+ * Rename `SuitesLoader` to `SuitesRegistry` to clarify purpose
+ * Extract snippet generators into extendable component
+ * Extract context generators into extendable component
+
+3.0.0beta7 / 2013-09-29
+=======================
+
+ * Multivalue options are now array options (format, output, name and tags)
+ * Added back junit formatter (should support all junit formats from 4 to 7)
+ * Added back html formatter
+ * Small optimizations and refactorings
+ * Proper handling of hook failures
+
+3.0.0beta6 / 2013-09-25
+=======================
+
+ * Skip step execution and `AfterStep` hook if its `BeforeStep` hook failed
+ * Fix failure-initiated skips of hooks in Scenario and Example testers
+ * Refactor Suite routines
+ * Cleanup Context Pools
+ * Enhance `--definitions` option with suites output and regex search
+ * Add `toString()` methods to `DefinitionInterface` and `TransformationInterface`
+ * Add `SnippetlessContextInterface` to `Snippet` namespace - to prevent snippet generation for
+ custom contexts
+
+3.0.0beta5 / 2013-09-15
+=======================
+
+ * Switch to Gherkin 3.0 parser
+ * Complete rewrite of pretty formatter (much better outline handling)
+ * Automatically add `use` for `PendingException` to contexts during `--append-snippets`
+ * Lots of optimizations
+
+3.0.0beta4 / 2013-08-17
+=======================
+
+ * Cleanup suite configuration sub-system
+ * New ability to turn off specific suites through `behat.yml`
+ * Support for danish language
+
+3.0.0beta3 / 2013-08-13
+=======================
+
+ * Refactor extension sub-system. Update `ExtensionInterface`
+ * Avoid trying to create folders for non-fs suites
+
+3.0.0beta2 / 2013-08-13
+=======================
+
+ * Remove support for Symfony 2.0 components
+
+3.0.0beta1 / 2013-08-13
+=======================
+
+ * New suite-centric architecture
+ * New context pools sub-system with multi-context support
+ * New dynamic event-driven testing core
+ * Refactored console processors sub-system
+ * Refactored formatters management sub-system
+ * 8 new process extension points and 36 generic execution extension points
+ * Gherkin caching is enabled by default
+ * Rerun is enabled by default (use `--rerun` to rerun failed scenarios)
+ * New Gherkin Role filter
+ * Subcontexts removed in favor of context pools
+ * Chained steps extracted into [separate extension](https://github.com/Behat/ChainedStepsExtension)
+ * Closured step definitions removed
+
+2.5.0 / 2013-08-11
+==================
+
+ * First Behat LTS release
+ * Update Junit formatter to reflect latest junit format (thanks @alistairstead)
+ * Fix some container options
+
+2.4.6 / 2013-06-06
+==================
+
+ * New --stop-on-failure option
+ * Support JSON in environment variables
+ * Update Gherkin
+ * Support Symfony 2.3
+ * Out-of-the-box support for PHPUnit assertions pretty output
+
+2.4.5 / 2013-01-27
+==================
+
+ * Added wrapping of lines in progress formatter
+ * Added `--append-to` option to be able to add snippets to custom class
+ * Both `ScenarioEvent` and `OutlineExampleEvent` now extend same `BaseScenarioEvent` class
+ * Highly improved ability to create simple custom extensions
+ * Always hide stack traces for `PendingException`
+ * Ensured compatibility with all major symfony versions
+ * Fixed configs import directive and loading precedence
+ * Fixed path to vendor dir (solves problem of custom vendor dirs)
+
+2.4.4 / 2012-09-12
+==================
+
+ * Fixed `RuntimeException` namespacing error
+ * Added `FormatterManager::disableFormatter(s)` method
+ * Updated Gherkin parser and fixed couple of helper bugs
+
+2.4.3 / 2012-07-28
+==================
+
+ * Fixed broken `output_path` setting ([issue #169](https://github.com/Behat/Behat/issues/169))
+ * Added shellbang to phar executable ([issue #167](https://github.com/Behat/Behat/issues/167))
+ * Added feature title to progress exceptions ([issue #166](https://github.com/Behat/Behat/issues/166))
+ * Tuned failed formatter to print only failed examples in outline ([issue #154](https://github.com/Behat/Behat/issues/154))
+ * Small bugfixes
+
+2.4.2 / 2012-06-26
+==================
+
+ * Fixed broken autoloading with Composer installation
+
+2.4.1 / 2012-06-26
+==================
+
+ * Force custom context class usage if user changed it from `FeatureContext`
+ * Clarified `Context class not found` exception
+ * Use CWD for CLI options, basepath (config path) for everything else
+ * Pass `behat.extension.classes` container param to extensions during their load
+ * Tuned `event_subscriber` priorities
+ * Use `require_once` instead of `require` in closured loaders
+ * Fixed transformers bug with falsy transformations (that return **falsy** values)
+ * Fixed custom formatters definition bug
+ * Fixed formatter manager exception bug
+ * Fixed czech translation
+ * Fixed CS to be PSR2 compliant
+
+2.4.0 / 2012-05-15
+==================
+
+ * New extension system based on Symfony2 DIC component
+ * Refactored paths reading system (now relative paths are fully supported)
+ * Support latest Composer changes
+ * Removed static constraint for transformations
+ * Updated to latest Gherkin with immutable AST
+ * Fixed couple of definition snippet generator bugs
+ * Option for HTML formatter to provide step definition links
+ * Added fallback locale (in case if provided lang is unsupported yet)
+ * Print step snippets in HTML formatter only if they're enabled
+ * Escape placeholder brackets in HTML formatter
+ * Use different names for examples in JUnit formatter
+ * Major core cleanup
+
+2.3.5 / 2012-03-30
+==================
+
+ * Fixed formatter language configuration and locale guesser
+
+2.3.4 / 2012-03-28
+==================
+
+ * Added `StepEvent::getLogicalParent()`. Fixed issue #115
+
+2.3.3 / 2012-03-09
+==================
+
+ * Implemented Gherkin caching support ([--cache](https://github.com/Behat/Behat/commit/753c4f6e392a873a640543306191d92e6dc91099))
+ * Line ranges filtering support (`behat features/some.feature:12-19`. Thanks @headrevision)
+ * `behat.yml.dist` configs support out of the box
+ * Minor bug fixes
+ * Updated Gherkin
+
+2.3.2 / 2012-01-29
+==================
+
+ * Fixed bug in `ErrorException`, that caused wrong exceptions on warnings and notices
+
+2.3.1 / 2012-01-26
+==================
+
+ * Updated error handler to avoid suppressed exceptions
+ * Autoload bootstrap scripts in their name order
+ * Updated Gherkin dependency to v2.0.1
+
+2.3.0 / 2012-01-19
+==================
+
+ * Switch to the Behat\Gherkin 2.0 usage
+ * Migration to the single-file translation
+ * Support for callables inside steps chains
+ * Support for `*.yml` and `*.php` as definition translations
+ * Added opposite options to option switchers (`--[no-]colors`, `--[no-]multiline`, etc.)
+ * Redesigned `--story-syntax`
+ * Refactored Runner
+ * Performance improvements
+ * Bugfixes
+
+2.2.7 / 2012-01-13
+==================
+
+ * Added ability to search translated definitions with `--definitions`
+ * Fixed custom formatters use bug
+
+2.2.6 / 2012-01-09
+==================
+
+ * Fixed pretty and html formatters printing of undefined steps in outlines
+
+2.2.5 / 2012-01-07
+==================
+
+ * `BEHAT_PARAMS` env variable support (083092e)
+ * HTML formatter print styles optimization (@davedevelopment)
+
+2.2.4 / 2012-01-04
+==================
+
+ * Prevent method name duplication with definition snippets
+
+2.2.3 / 2012-01-04
+==================
+
+ * Fixed couple of `--append-snippets` bugs
+
+2.2.2 / 2011-12-21
+==================
+
+ * Fixed Composer deps
+
+2.2.1 / 2011-12-21
+==================
+
+ * Fixed Composer package bin
+
+2.2.0 / 2011-12-14
+==================
+
+ * Multiple formats and outputs support
+ * New `snippets` formatter
+ * New `failed` formatter
+ * Updated output of `-d` option
+ * Search abilities added to `-d` option
+ * New `--dry-run` option
+ * New `--append-snippets` option
+ * Rerun functionality refactored to use `failed` formatter internally
+ * Overall code refactoring and cleaning
+ * Polish translation added (Joseph Bielawski)
+ * Spanish translation updated (Andrés Botero)
+ * Locale autodetect
+
+2.1.3 / 2011-11-04
+==================
+
+ * Substep translations support
+ * Correctly print undefined substeps in pretty printer
+ * @Transform callback now gets all provided matches
+ * Always set proper encoding (UTF8)
+
+2.1.2 / 2011-10-12
+==================
+
+ * Fixed filtered feature hooks
+ * Fixed JUnit formatter time output in some locales
+
+2.1.1 / 2011-10-09
+==================
+
+ * Fixed multiline titles printing bug
+ * Fixed outline parameter inside step argument printing bug
+
+2.1.0 / 2011-09-12
+==================
+
+ * Totally revamped HTML formatter template
+ * Added transliteration support to definition snippets (for most langs)
+ * Written missed features and fixed some bugs
+ * Stabilization fixes for 3 major OS: MacOS/Ubuntu/Windows
+
+2.0.5 / 2011-08-07
+==================
+
+ * Cleaned ContextDispatcher extension points
+ * Cleaned context-parameters passing behavior
+
+2.0.4 / 2011-08-02
+==================
+
+ * Subcontexts aliasing and retrieving
+ * Multiple steps chaining
+ * `--snippets-paths` option to show steps alongside the snippets
+ * getContextParameters() method in SuiteEvent and FeatureEvent
+ * Updated to Symfony2 stable components
+ * Spanish translation
+ * Dutch translation
+
+2.0.3 / 2011-07-20
+==================
+
+ * Fixed JUnit formatter CDATA output
+
+2.0.2 / 2011-07-17
+==================
+
+ * Added extra checks to context instance mapper
+ * Fixed i18n support in definitions printer
+ * Refactored Gherkin tags inheritance
+
+2.0.1 / 2011-07-12
+==================
+
+ * Exception prefix added to statuses. Now you should throw `PendingException` instead of just
+ `Pending`
+
+2.0.0 / 2011-07-12
+==================
+
+ * Brand new Context-oriented architecture
+ * Refactored --definitions (--steps) to print more useful info
+ * Rafactored --story-syntax (--usage) to print more useful info
+ * Refactored Command to use separate processors
+ * Added --no-paths option
+ * Added --no-snippets option
+ * Added --expand option to expand outlines
+ * phar package
+ * Faster autoloader
+ * Steps chaining added
+ * Added BEHAT_ERROR_REPORTING constant to change error_repoting level
+ * Fixed some Gherkin bugs
+ * Fixed lots of bugs in Behat itself
+
+1.1.9 / 2011-06-17
+==================
+
+ * Updated to the latest Symfony components
+
+1.1.8 / 2011-06-09
+==================
+
+ * Fixed empty match printing in Pretty and HTML formatters
+ * Updated to latest Symfony components
+
+1.1.7 / 2011-06-03
+==================
+
+ * Fixed steps colorization bug in outline
+ * Additional checks in config import routine
+
+1.1.6 / 2011-05-27
+==================
+
+ * Updated Symfony vendors
+ * Refactored console formatters
+
+1.1.5 / 2011-05-17
+==================
+
+ * Fixed CWD path finding
+ * Fixed HTML formatter (thanks @glenjamin)
+
+1.1.4 / 2011-05-03
+==================
+
+ * Fixed `--out` option usage critical bug
+ * Added ability to specify `output_path` from config file
+
+1.1.3 / 2011-04-28
+==================
+
+ * JUnit formatter fix
+ * Formatters basePath fix. Now formatters uses CWD as path trimmer
+ * Relative paths locator bug fix
+ * Show table argument header in HTML formatter
+
+1.1.2 / 2011-04-27
+==================
+
+ * Fixed custom features path locator bug(issue #020)
+
+1.1.1 / 2011-04-21
+==================
+
+ * Fixed paths finding routines
+ * Totally refactored BehatCommand
+ * Added rerun functionality (`--rerun`)
+ * Ability to remove previously specified paths in `behat.yml`
+ * Bugfixes and little tweaks
+
+1.1.0 / 2011-04-04
+==================
+
+ * New configuration system with profiles and imports support
+ * New event system
+ * Environment parameters support
+ * Named regex arguments support
+ * Japanese translation for formatters
+ * JUnit formatter bugfixes
+ * HTML and Pretty formatters multiple arguments print bugfix
+ * Step snippets (proposals) bugfixes
+ * Updated vendor libraries
+
+1.0.0 / 2011-03-08
+==================
+
+ * Changed XSD
+ * Updated vendors
+
+1.0.0RC6 / 2011-03-03
+=====================
+
+ * Cleaned command options
+ * Added --init option
+ * Multiple paths support in behat.yml
+ * Application options refactoring
+
+1.0.0RC5 / 2011-02-25
+=====================
+
+ * Windows support
+ * Bundled features hooks optimizations
+
+1.0.0RC4 / 2011-02-23
+=====================
+
+ * Pretty formatter tag printing fix
+ * Custom formatter specification fix in `behat.yml`
+ * Symfony components updated
+ * Extension configuration manager (Symfony\Component\Config component)
+ * Cleaning of `behat.yml` configurator (thanks to Symfony\Component\Config)
+ * Additional formatter parameters support in `behat.yml`
+
+1.0.0RC3 / 2011-02-18
+=====================
+
+ * Event dispatcher binding optimizations
+ * Command API optimizations for easier overloading
+ * Formatter path trimming bugfix
+ * BehatExtension config merging support
+
+1.0.0RC2 / 2011-02-15
+=====================
+
+ * Step printing option bugfix
+
+1.0.0RC1 / 2011-02-15
+=====================
+
+ * Gherkin DSL parser is standalone project
+ * Own Behat namespace for both Behat & Gherkin
+ * Fully rewritten formatters (much cleaner & beautifull API)
+ * Big refactoring of whole Behat code (clean code DRYing)
+ * Config file is now handled by standart-driven DIC extension (cleaner `behat.yml`)
+ * API documentation retouched
+ * New `--strict` option
+ * New `--no-multiline` option
+ * Feature examples in your language with `--usage`
+ * Available definitions listing with `--steps`
+ * Definition i18n
+ * Command refactoring (much cleaner API & actions)
+ * Event system refactoring
+ * 42 new languages with new Gherkin DSL parser
+
+0.3.6 / 2010-12-07
+==================
+
+ * [Behat,Gherkin] Fixed French support includes (fr)
+
+0.3.6 / 2010-12-06
+==================
+
+ * [Behat] Updated Symfony2 Components to latest PR4
+ * [Gherkin] Added French support (fr)
+ * [Gherkin] Added German support (de)
+ * [Behat] Small bugfixes
+
+0.3.5 / 2010-11-19
+==================
+
+ * [Behat] Refactored EnvironmentBuilder to allow Environment service definition overload
+
+0.3.4 / 2010-11-18
+==================
+
+ * [Behat] Introduced environment builder
+ * [Gherkin,Behat] id locale support
+
+0.3.3 / 2010-11-07
+==================
+
+ * [Gherkin] Added ability to create Table & PyString nodes with hands (in your step to step calls for example)
+ * [Gherkin] Added getRowsHash() method to TableNode, so now you can "rotate" given tables
+ * [Gherkin] You now can add comments before language specification in your feature files
+
+0.3.2 / 2010-11-06
+==================
+
+ * [Gherkin] Added ability to specify extended langs (en-US)
+ * [Behat,Gherkin] Added pt-BR translation
+
+0.3.1 / 2010-11-02
+==================
+
+ * [Behat] JUnit formatter
+ * [Behat] Pretty & HTML formatter background hooks fix
+ * [Behat] Other small fixes
+
+0.3.0 / 2010-11-02
+==================
+
+ * [Behat] Refactored tags filter
+ * [Behat] Added name filter
+ * [Behat] Refactored hooks
+ * [Behat] Added tagged/named hooks
+ * [Behat] Customizable HTML formatter with w3c valid default markup
+ * [Behat] Ability to specify out path for formatters
+ * [Behat] Bunch of new options
+ * [Behat] DIC optimisations
+
+0.2.5 / 2010-10-22
+==================
+
+ * [Behat] Format manager introduced
+ * [Behat] Formatters refactoring
+ * [Behat] Optmized container parameters to support EverzetBehatBundle
+ * [Behat] --no-color => --no-colors
+
+0.2.4 / 2010-10-19
+==================
+
+ * [Behat] Autoguess of colors support
+ * [Behat] Formatter setup bugfix (properl casing)
+
+0.2.3 / 2010-10-19
+==================
+
+ * [Behat] Filters optimisations
+ * [Behat] Changed Core Loaders with topic-specific (`StepDefinition\Loader\PHPLoader`,
+ `Features\Loader\GherkinLoader`)
+ * [Behat] Simplified TestCommand in prepare of Symfony2 BehatBundle
+ * [Behat] Configuration file/path setting update (you can now create `behat.yml` inside `./config/behat.yml` & Behat
+ will load it
+ * [Behat] Updated Redundant & Ambiguous exceptions behavior
+
+0.2.2 / 2010-10-10
+==================
+
+ * [Behat] Configuration file/path setting update
+
+0.2.1 / 2010-10-10
+==================
+
+ * [PEAR] Fix path to phpbin on installation
+
+0.2.0 / 2010-10-08
+==================
+
+ * [Behat] Brand new stateless testers, based on Visitor pattern
+ * [Behat] Refactored event listeners & event names
+ * [Behat] Refactored formatters to confirm with new stateless testers (statuses now sent as event parameters)
+ * [Behat] Refactored ConsoleFormatter (and removed base formatter)
+ * [Behat] Removed custom I18n classes & refactored Translator routines in flavor of Symfony\Component\Translation
+ * [Behat] Added missed translation strings into XLIFF files
+ * [Behat] Optimised multiline arguments (Node instances are sent to definitions instead of their plain representations)
+ * [Behat] Support for Scenario Outline tokens replace in multiline arguments (tables & pystrings)
+ * [Behat] Step arguments transformations (including table transformations)
+ * [Behat] Colorize inline step arguments
+ * [Behat] Optimized exit statuses of CLI
+ * [Behat] Added ability to turn-off colors
+ * [Behat] Added ability to translate formatters output with `--i18n` option
+ * [Behat] Bunch of new core feature tests
+ * [Gherkin] Parser now uses Symfony Dependency Injection to
+ * [Gherkin] Refactored parser to be like AST (Nodes that supports Visitor pattern)
+ * [Gherkin] Comments support
+ * [Gherkin] Fixed PHPUnit warnings
+ * [Behat,Gherkin] PEAR release script to support http://pear.everzet.com release model
+ * [Behat,Gherkin] DIC naming refactoring
+ * [Behat,Gherkin] Autoloader refactoring
+ * [Behat,Gherkin] Removed Zend & Goutte depencies
+
+0.1.5 / 2010-09-25
+==================
+
+ * Added ability to call other steps inside step definition
+ * Added profiles
+ * Refactored container creation routine
+ * Single quotes support in step definitions
+ * Added tests for hooks, profiles, inline steps
+
+0.1.4 / 2010-09-16
+==================
+
+ * Refactored code
+ * Removed logic from object constructors
+ * Added Loader & Filter interfaces
+
+0.1.3 / 2010-09-14
+==================
+
+ * Ability to specify arrays of paths/files for loaders
+ * Event hooks and support for `support/hooks.php`
+ * Formatters listens events with smallest priority
+ * Don't try to load steps if `steps` folder doesn't exists
+ * Bugfixes/refactoring
+
+0.1.2 / 2010-09-10
+==================
+
+ * Added ability to read from `behat.yml` and `behat.xml`
+ * Moved tags filter to separate object
+ * Refactored injection controller
+ * Optimized event names in event dispatcher
+ * Other small fixes/refactorings
+
+0.1.1 / 2010-09-09
+==================
+
+ * Added `--tags` option
+ * Changed environment (world) routines
+ * Added lots of core tests (writed in Behat itself)
+
+0.1.0 / 2010-09-08
+==================
+
+ * Initial release
diff --git a/vendor/behat/behat/CONTRIBUTING.md b/vendor/behat/behat/CONTRIBUTING.md
new file mode 100644
index 0000000..7d8b2d2
--- /dev/null
+++ b/vendor/behat/behat/CONTRIBUTING.md
@@ -0,0 +1,46 @@
+Contributing
+------------
+
+Behat is an open source, community-driven project. If you'd like to contribute,
+feel free to do this, but remember to follow this few simple rules:
+
+- Make your feature addition or bug fix,
+- __Always__ as base for your changes use `master` branch (all new development
+ happens here),
+- Add `*.features` for those changes (please look into `features/` folder for
+ some examples). This is important so we don't break it in a future version
+ unintentionally,
+- Commit your code, but do not mess with `BehatApplication` version, or
+ `CHANGES.md` one,
+- __Remember__: when you create Pull Request, always select `master` branch as
+ target, otherwise it will be closed (this is selected by default).
+
+Backwards compatibility
+-----------------------
+
+Starting from `v3.0.0`, Behat is following [Semantic Versioning v2.0.0](http://semver.org/spec/v2.0.0.html).
+This means that we take backwards compatibility of public API very seriously. So unless you want your PR to start a
+new major version of Behat (`v4.0.0` for example), you need to make sure that either you do not change existing
+interfaces and their usage across the system or that you at least introduce backwards compatibility layer together with
+your change. Not following these rules will cause a rejection of your PR. Exception could be an extremely rare case
+where BC break is introduced as a measure to fix a serious issue.
+
+You can read detailed guidance on what BC means in [Symfony2 BC guide](http://symfony.com/doc/current/contributing/code/bc.html).
+
+Contributing to Formatter Translations
+--------------------------------------
+
+Almost any output message (except exceptions and custom output) printed by Behat
+formatters could be translated into your language with `--lang` option. In order
+to fix/add translation, edit the appropriate section of the `i18n.php` file.
+
+Running tests
+-------------
+
+Make sure that you don't break anything with your changes by running the test
+suite with your locale set to english:
+
+```bash
+$> LANG=C bin/behat
+```
+
diff --git a/vendor/behat/behat/LICENSE b/vendor/behat/behat/LICENSE
new file mode 100644
index 0000000..10e33a9
--- /dev/null
+++ b/vendor/behat/behat/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2011-2014 Konstantin Kudryashov
+
+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.
diff --git a/vendor/behat/behat/README.md b/vendor/behat/behat/README.md
new file mode 100644
index 0000000..bb7377b
--- /dev/null
+++ b/vendor/behat/behat/README.md
@@ -0,0 +1,74 @@
+
+
+Behat is a BDD framework for PHP to help you test business expectations.
+
+[](https://gitter.im/Behat/Behat)
+[](https://packagist.org/packages/behat/behat)
+[](https://travis-ci.org/Behat/Behat)
+[](http://hhvm.h4cc.de/package/behat/behat)
+[](https://scrutinizer-ci.com/g/Behat/Behat/)
+[](https://packagist.org/packages/behat/behat)
+
+Installing Behat
+----------------
+
+The easiest way to install Behat is by using [Composer](https://getcomposer.org):
+
+```bash
+$> curl -sS https://getcomposer.org/installer | php
+$> php composer.phar require behat/behat='~3.0.6'
+```
+
+After that you'll be able to run Behat via:
+
+```bash
+$> vendor/bin/behat
+```
+
+Installing Development Version
+------------------------------
+
+Clone the repository and install dependencies via [Composer](https://getcomposer.org):
+
+```bash
+$> curl -sS https://getcomposer.org/installer | php
+$> php composer.phar install
+```
+
+After that you will be able to run development version of Behat via:
+
+```bash
+$> bin/behat
+```
+
+Contributing
+------------
+
+Before contributing to Behat, please take a look at the [CONTRIBUTING.md](CONTRIBUTING.md) document.
+
+Versioning
+----------
+
+Starting from `v3.0.0`, Behat is following [Semantic Versioning v2.0.0](http://semver.org/spec/v2.0.0.html).
+This basically means that if all you do is implement interfaces (like [this one](https://github.com/Behat/Behat/blob/master/src/Behat/Behat/Context/ContextClass/ClassResolver.php#L15-L22))
+and use service constants (like [this one](https://github.com/Behat/Behat/blob/master/src/Behat/Behat/Context/ServiceContainer/ContextExtension.php#L45)),
+you would not have any backwards compatibility issues with Behat up until `v4.0.0` (or later major)
+is released. Exception could be an extremely rare case where BC break is introduced as a measure
+to fix a serious issue.
+
+You can read detailed guidance on what BC means in [Symfony2 BC guide](http://symfony.com/doc/current/contributing/code/bc.html).
+
+Useful Links
+------------
+
+- The main website is at [http://behat.org](http://behat.org)
+- The documentation is at [http://behat.readthedocs.org](http://docs.behat.org/en/latest/)
+- Official Google Group is at [http://groups.google.com/group/behat](http://groups.google.com/group/behat)
+- IRC channel on [#freenode](http://freenode.net/) is `#behat`
+- [Note on Patches/Pull Requests](CONTRIBUTING.md)
+
+Contributors
+------------
+
+- Konstantin Kudryashov [everzet](http://github.com/everzet) [lead developer]
+- Other [awesome developers](https://github.com/Behat/Behat/graphs/contributors)
diff --git a/vendor/behat/behat/bin/behat b/vendor/behat/behat/bin/behat
new file mode 100755
index 0000000..db21469
--- /dev/null
+++ b/vendor/behat/behat/bin/behat
@@ -0,0 +1,31 @@
+#!/usr/bin/env php
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+define('BEHAT_BIN_PATH', __FILE__);
+
+function includeIfExists($file)
+{
+ if (file_exists($file)) {
+ return include $file;
+ }
+}
+
+if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
+ fwrite(STDERR,
+ 'You must set up the project dependencies, run the following commands:'.PHP_EOL.
+ 'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
+ 'php composer.phar install'.PHP_EOL
+ );
+ exit(1);
+}
+
+$factory = new \Behat\Behat\ApplicationFactory();
+$factory->createApplication()->run();
diff --git a/vendor/behat/behat/bin/behat.bat b/vendor/behat/behat/bin/behat.bat
new file mode 100755
index 0000000..1034418
--- /dev/null
+++ b/vendor/behat/behat/bin/behat.bat
@@ -0,0 +1,17 @@
+@echo off
+REM Behat
+REM
+REM This file is part of the Behat.
+REM (c) Konstantin Kudryashov
+REM
+REM For the full copyright and license information, please view the LICENSE
+REM file that was distributed with this source code.
+REM
+
+if "%PHPBIN%" == "" set PHPBIN=@php_bin@
+if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
+GOTO RUN
+:USE_PEAR_PATH
+set PHPBIN=%PHP_PEAR_PHP_BIN%
+:RUN
+"%PHPBIN%" "@bin_dir@\behat" %*
\ No newline at end of file
diff --git a/vendor/behat/behat/box.json b/vendor/behat/behat/box.json
new file mode 100644
index 0000000..63118b8
--- /dev/null
+++ b/vendor/behat/behat/box.json
@@ -0,0 +1,19 @@
+{
+ "chmod": "0755",
+ "directories": ["src"],
+ "files": [
+ "LICENSE",
+ "i18n.php"
+ ],
+ "finder": [
+ {
+ "name": ["*.php", "*.xsd", "LICENSE"],
+ "exclude": ["Tests", "tests", "sebastian", "phpunit", "phpspec", "process", "filesystem"],
+ "in": "vendor"
+ }
+ ],
+ "compactors": "Herrera\\Box\\Compactor\\Php",
+ "main": "bin/behat",
+ "output": "behat.phar",
+ "stub": true
+}
diff --git a/vendor/behat/behat/composer.json b/vendor/behat/behat/composer.json
new file mode 100644
index 0000000..a4c5b28
--- /dev/null
+++ b/vendor/behat/behat/composer.json
@@ -0,0 +1,56 @@
+{
+ "name": "behat/behat",
+ "description": "Scenario-oriented BDD framework for PHP 5.3",
+ "keywords": ["BDD", "ScenarioBDD", "StoryBDD", "Examples", "Scrum", "Agile", "User story", "Symfony", "business", "development", "testing", "documentation"],
+ "homepage": "http://behat.org/",
+ "type": "library",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+
+ "require": {
+ "php": ">=5.3.3",
+ "ext-mbstring": "*",
+ "behat/gherkin": "~4.3",
+ "behat/transliterator": "~1.0",
+ "symfony/console": "~2.1",
+ "symfony/config": "~2.3",
+ "symfony/dependency-injection": "~2.1",
+ "symfony/event-dispatcher": "~2.1",
+ "symfony/translation": "~2.3",
+ "symfony/yaml": "~2.1",
+ "symfony/class-loader": "~2.1"
+ },
+
+ "require-dev": {
+ "symfony/process": "~2.1",
+ "phpspec/prophecy-phpunit": "~1.0",
+ "phpunit/phpunit": "~4.0"
+ },
+
+ "suggest": {
+ "behat/symfony2-extension": "for integration with Symfony2 web framework",
+ "behat/yii-extension": "for integration with Yii web framework",
+ "behat/mink-extension": "for integration with Mink testing framework"
+ },
+
+ "autoload": {
+ "psr-0": {
+ "Behat\\Behat": "src/",
+ "Behat\\Testwork": "src/"
+ }
+ },
+
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0.x-dev"
+ }
+ },
+
+ "bin": ["bin/behat"]
+}
diff --git a/vendor/behat/behat/features/append_snippets.feature b/vendor/behat/behat/features/append_snippets.feature
new file mode 100644
index 0000000..0c39f3c
--- /dev/null
+++ b/vendor/behat/behat/features/append_snippets.feature
@@ -0,0 +1,827 @@
+Feature: Append snippets option
+ In order to use definition snippets fully
+ As a context developer
+ I need to be able to autoappend snippets to context
+
+ Background:
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ parameters = $parameters;
+ }
+
+ /**
+ * @Given /^I have (\d+) apples?$/
+ */
+ public function iHaveApples($count) {
+ $this->apples = intval($count);
+ }
+
+ /**
+ * @When /^I ate (\d+) apples?$/
+ */
+ public function iAteApples($count) {
+ $this->apples -= intval($count);
+ }
+
+ /**
+ * @When /^I found (\d+) apples?$/
+ */
+ public function iFoundApples($count) {
+ $this->apples += intval($count);
+ }
+
+ /**
+ * @Then /^I should have (\d+) apples$/
+ */
+ public function iShouldHaveApples($count) {
+ \PHPUnit_Framework_Assert::assertEquals(intval($count), $this->apples);
+ }
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be equal to "([^"]*)"$/
+ */
+ public function contextParameterShouldBeEqualTo($key, $val) {
+ \PHPUnit_Framework_Assert::assertEquals($val, $this->parameters[$key]);
+ }
+
+ /**
+ * @Given /^context parameter "([^"]*)" should be array with (\d+) elements$/
+ */
+ public function contextParameterShouldBeArrayWithElements($key, $count) {
+ \PHPUnit_Framework_Assert::assertInternalType('array', $this->parameters[$key]);
+ \PHPUnit_Framework_Assert::assertEquals(2, count($this->parameters[$key]));
+ }
+
+ private function doSomethingUndefinedWith() {}
+ }
+ """
+ And a file named "features/apples.feature" with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ Then I should have 3 apples
+
+ Scenario: Found more apples
+ When I found 5 apples
+ Then I should have 8 apples
+
+ Scenario: Found more apples
+ When I found 2 apples
+ Then I should have 5 apples
+ And do something undefined with $
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+ And do something undefined with \1
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines
+ Given pystring:
+ '''
+ some pystring
+ '''
+ And pystring 5:
+ '''
+ other pystring
+ '''
+ And table:
+ | col1 | col2 |
+ | val1 | val2 |
+ """
+
+ Scenario: Append snippets to main context
+ When I run "behat -f progress --append-snippets"
+ Then "features/bootstrap/FeatureContext.php" file should contain:
+ """
+ parameters = $parameters;
+ }
+
+ /**
+ * @Given /^I have (\d+) apples?$/
+ */
+ public function iHaveApples($count) {
+ $this->apples = intval($count);
+ }
+
+ /**
+ * @When /^I ate (\d+) apples?$/
+ */
+ public function iAteApples($count) {
+ $this->apples -= intval($count);
+ }
+
+ /**
+ * @When /^I found (\d+) apples?$/
+ */
+ public function iFoundApples($count) {
+ $this->apples += intval($count);
+ }
+
+ /**
+ * @Then /^I should have (\d+) apples$/
+ */
+ public function iShouldHaveApples($count) {
+ \PHPUnit_Framework_Assert::assertEquals(intval($count), $this->apples);
+ }
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be equal to "([^"]*)"$/
+ */
+ public function contextParameterShouldBeEqualTo($key, $val) {
+ \PHPUnit_Framework_Assert::assertEquals($val, $this->parameters[$key]);
+ }
+
+ /**
+ * @Given /^context parameter "([^"]*)" should be array with (\d+) elements$/
+ */
+ public function contextParameterShouldBeArrayWithElements($key, $count) {
+ \PHPUnit_Framework_Assert::assertInternalType('array', $this->parameters[$key]);
+ \PHPUnit_Framework_Assert::assertEquals(2, count($this->parameters[$key]));
+ }
+
+ private function doSomethingUndefinedWith() {}
+
+ /**
+ * @Then /^do something undefined with \$$/
+ */
+ public function doSomethingUndefinedWith2()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Then /^do something undefined with \\(\d+)$/
+ */
+ public function doSomethingUndefinedWith3($arg1)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring (\d+):$/
+ */
+ public function pystring2($arg1, PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ }
+ """
+
+ Scenario: Append snippets to main context with auto use PendingException
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ parameters = $parameters;
+ }
+
+ /**
+ * @Given /^I have (\d+) apples?$/
+ */
+ public function iHaveApples($count) {
+ $this->apples = intval($count);
+ }
+
+ /**
+ * @When /^I ate (\d+) apples?$/
+ */
+ public function iAteApples($count) {
+ $this->apples -= intval($count);
+ }
+
+ /**
+ * @When /^I found (\d+) apples?$/
+ */
+ public function iFoundApples($count) {
+ $this->apples += intval($count);
+ }
+
+ /**
+ * @Then /^I should have (\d+) apples$/
+ */
+ public function iShouldHaveApples($count) {
+ \PHPUnit_Framework_Assert::assertEquals(intval($count), $this->apples);
+ }
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be equal to "([^"]*)"$/
+ */
+ public function contextParameterShouldBeEqualTo($key, $val) {
+ \PHPUnit_Framework_Assert::assertEquals($val, $this->parameters[$key]);
+ }
+
+ /**
+ * @Given /^context parameter "([^"]*)" should be array with (\d+) elements$/
+ */
+ public function contextParameterShouldBeArrayWithElements($key, $count) {
+ \PHPUnit_Framework_Assert::assertInternalType('array', $this->parameters[$key]);
+ \PHPUnit_Framework_Assert::assertEquals(2, count($this->parameters[$key]));
+ }
+
+ private function doSomethingUndefinedWith() {}
+ }
+ """
+ When I run "behat -f progress --append-snippets"
+ Then "features/bootstrap/FeatureContext.php" file should contain:
+ """
+ parameters = $parameters;
+ }
+
+ /**
+ * @Given /^I have (\d+) apples?$/
+ */
+ public function iHaveApples($count) {
+ $this->apples = intval($count);
+ }
+
+ /**
+ * @When /^I ate (\d+) apples?$/
+ */
+ public function iAteApples($count) {
+ $this->apples -= intval($count);
+ }
+
+ /**
+ * @When /^I found (\d+) apples?$/
+ */
+ public function iFoundApples($count) {
+ $this->apples += intval($count);
+ }
+
+ /**
+ * @Then /^I should have (\d+) apples$/
+ */
+ public function iShouldHaveApples($count) {
+ \PHPUnit_Framework_Assert::assertEquals(intval($count), $this->apples);
+ }
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be equal to "([^"]*)"$/
+ */
+ public function contextParameterShouldBeEqualTo($key, $val) {
+ \PHPUnit_Framework_Assert::assertEquals($val, $this->parameters[$key]);
+ }
+
+ /**
+ * @Given /^context parameter "([^"]*)" should be array with (\d+) elements$/
+ */
+ public function contextParameterShouldBeArrayWithElements($key, $count) {
+ \PHPUnit_Framework_Assert::assertInternalType('array', $this->parameters[$key]);
+ \PHPUnit_Framework_Assert::assertEquals(2, count($this->parameters[$key]));
+ }
+
+ private function doSomethingUndefinedWith() {}
+
+ /**
+ * @Then /^do something undefined with \$$/
+ */
+ public function doSomethingUndefinedWith2()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Then /^do something undefined with \\(\d+)$/
+ */
+ public function doSomethingUndefinedWith3($arg1)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring (\d+):$/
+ */
+ public function pystring2($arg1, PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ }
+ """
+
+ Scenario: Append snippets to two contexts
+ Given a file named "features/bootstrap/FirstContext.php" with:
+ """
+ strings[1] = "hello,\n w\n o\nr\nl\n d";
+ $this->tables[1] = array(
+ array('item1' => 'super', 'item2' => 'mega', 'item3' => 'extra'),
+ array('item1' => 'hyper', 'item2' => 'mini', 'item3' => 'XXL'),
+ );
+ }
+
+ /**
+ * @Given /^a pystring:$/
+ */
+ public function aPystring(PyStringNode $string) {
+ $this->input = $string;
+ }
+
+ /**
+ * @Given /^a table:$/
+ */
+ public function aTable(TableNode $table) {
+ $this->input = $table;
+ }
+
+ /**
+ * @Then /^it must be equals to string (\d+)$/
+ */
+ public function itMustBeEqualsToString($number) {
+ \PHPUnit_Framework_Assert::assertEquals($this->strings[intval($number)], (string) $this->input);
+ }
+
+ /**
+ * @Then /^it must be equals to table (\d+)$/
+ */
+ public function itMustBeEqualsToTable($number) {
+ \PHPUnit_Framework_Assert::assertEquals($this->tables[intval($number)], $this->input->getHash());
+ }
+
+ /**
+ * @Given /^I have number2 = (?P\d+) and number1 = (?P\d+)$/
+ */
+ public function iHaveNumberAndNumber($number1, $number2) {
+ \PHPUnit_Framework_Assert::assertEquals(13, intval($number1));
+ \PHPUnit_Framework_Assert::assertEquals(243, intval($number2));
+ }
+ }
+ """
+
+ Scenario: PyStrings
+ Given a file named "features/pystring.feature" with:
+ """
+ Feature: PyStrings
+ Scenario:
+ Given a pystring:
+ '''
+ hello,
+ w
+ o
+ r
+ l
+ d
+ '''
+ Then it must be equals to string 1
+ """
+ When I run "behat --no-colors -f progress features/pystring.feature"
+ Then it should pass with:
+ """
+ ..
+
+ 1 scenario (1 passed)
+ 2 steps (2 passed)
+ """
+
+ Scenario: PyString tokens
+ Given a file named "features/pystring_tokens.feature" with:
+ """
+ Feature: PyStrings
+ Scenario Outline:
+ Given a pystring:
+ '''
+
+ w
+ o
+ r
+
+ d
+ '''
+ Then it must be equals to string 1
+
+ Examples:
+ | word1 | word2 |
+ | hello, | l |
+ """
+ When I run "behat --no-colors -f progress features/pystring_tokens.feature"
+ Then it should pass with:
+ """
+ ..
+
+ 1 scenario (1 passed)
+ 2 steps (2 passed)
+ """
+
+ Scenario: Table tokens
+ Given a file named "features/table_tokens.feature" with:
+ """
+ Feature: Tables
+ Scenario Outline:
+ Given a table:
+ | item1 | item2 | item3 |
+ | | | extra |
+ | hyper | mini | |
+ Then it must be equals to table 1
+
+ Examples:
+ | word1 | word2 | word3 |
+ | super | XXL | mega |
+ """
+ When I run "behat --no-colors -f progress features/table_tokens.feature"
+ Then it should pass with:
+ """
+ ..
+
+ 1 scenario (1 passed)
+ 2 steps (2 passed)
+ """
+
+ Scenario: Table
+ Given a file named "features/table.feature" with:
+ """
+ Feature: Tables
+ Scenario:
+ Given a table:
+ | item1 | item2 | item3 |
+ | super | mega | extra |
+ | hyper | mini | XXL |
+ Then it must be equals to table 1
+ """
+ When I run "behat --no-colors -f progress features/table.feature"
+ Then it should pass with:
+ """
+ ..
+
+ 1 scenario (1 passed)
+ 2 steps (2 passed)
+ """
+
+ Scenario: Named arguments
+ Given a file named "features/named_args.feature" with:
+ """
+ Feature: Named arguments
+ In order to maintain i18n for steps
+ As a step developer
+ I need to be able to declare regex with named parameters
+
+ Scenario:
+ Given I have number2 = 243 and number1 = 13
+ """
+ When I run "behat --no-colors -f progress features/named_args.feature "
+ Then it should pass with:
+ """
+ .
+
+ 1 scenario (1 passed)
+ 1 step (1 passed)
+ """
diff --git a/vendor/behat/behat/features/bootstrap/FeatureContext.php b/vendor/behat/behat/features/bootstrap/FeatureContext.php
new file mode 100644
index 0000000..6d301be
--- /dev/null
+++ b/vendor/behat/behat/features/bootstrap/FeatureContext.php
@@ -0,0 +1,308 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Behat\Behat\Context\Context;
+use Behat\Gherkin\Node\PyStringNode;
+use Symfony\Component\Process\PhpExecutableFinder;
+use Symfony\Component\Process\Process;
+
+/**
+ * Behat test suite context.
+ *
+ * @author Konstantin Kudryashov
+ */
+class FeatureContext implements Context
+{
+ /**
+ * @var string
+ */
+ private $phpBin;
+ /**
+ * @var Process
+ */
+ private $process;
+ /**
+ * @var string
+ */
+ private $workingDir;
+
+ /**
+ * Cleans test folders in the temporary directory.
+ *
+ * @BeforeSuite
+ * @AfterSuite
+ */
+ public static function cleanTestFolders()
+ {
+ if (is_dir($dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'behat')) {
+ self::clearDirectory($dir);
+ }
+ }
+
+ /**
+ * Prepares test folders in the temporary directory.
+ *
+ * @BeforeScenario
+ */
+ public function prepareTestFolders()
+ {
+ $dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'behat' . DIRECTORY_SEPARATOR .
+ md5(microtime() * rand(0, 10000));
+
+ mkdir($dir . '/features/bootstrap/i18n', 0777, true);
+
+ $phpFinder = new PhpExecutableFinder();
+ if (false === $php = $phpFinder->find()) {
+ throw new \RuntimeException('Unable to find the PHP executable.');
+ }
+ $this->workingDir = $dir;
+ $this->phpBin = $php;
+ $this->process = new Process(null);
+ }
+
+ /**
+ * Creates a file with specified name and context in current workdir.
+ *
+ * @Given /^(?:there is )?a file named "([^"]*)" with:$/
+ *
+ * @param string $filename name of the file (relative path)
+ * @param PyStringNode $content PyString string instance
+ */
+ public function aFileNamedWith($filename, PyStringNode $content)
+ {
+ $content = strtr((string) $content, array("'''" => '"""'));
+ $this->createFile($this->workingDir . '/' . $filename, $content);
+ }
+
+ /**
+ * Moves user to the specified path.
+ *
+ * @Given /^I am in the "([^"]*)" path$/
+ *
+ * @param string $path
+ */
+ public function iAmInThePath($path)
+ {
+ $this->moveToNewPath($path);
+ }
+
+ /**
+ * Checks whether a file at provided path exists.
+ *
+ * @Given /^file "([^"]*)" should exist$/
+ *
+ * @param string $path
+ */
+ public function fileShouldExist($path)
+ {
+ PHPUnit_Framework_Assert::assertFileExists($this->workingDir . DIRECTORY_SEPARATOR . $path);
+ }
+
+ /**
+ * Sets specified ENV variable
+ *
+ * @When /^"BEHAT_PARAMS" environment variable is set to:$/
+ *
+ * @param PyStringNode $value
+ */
+ public function iSetEnvironmentVariable(PyStringNode $value)
+ {
+ $this->process->setEnv(array('BEHAT_PARAMS' => (string) $value));
+ }
+
+ /**
+ * Runs behat command with provided parameters
+ *
+ * @When /^I run "behat(?: ((?:\"|[^"])*))?"$/
+ *
+ * @param string $argumentsString
+ */
+ public function iRunBehat($argumentsString = '')
+ {
+ $argumentsString = strtr($argumentsString, array('\'' => '"'));
+
+ $this->process->setWorkingDirectory($this->workingDir);
+ $this->process->setCommandLine(
+ sprintf(
+ '%s %s %s %s',
+ $this->phpBin,
+ escapeshellarg(BEHAT_BIN_PATH),
+ $argumentsString,
+ strtr('--format-settings=\'{"timer": false}\'', array('\'' => '"', '"' => '\"'))
+ )
+ );
+
+ // Don't reset the LANG variable on HHVM, because it breaks HHVM itself
+ if (!defined('HHVM_VERSION')) {
+ $env = $this->process->getEnv();
+ $env['LANG'] = 'en'; // Ensures that the default language is en, whatever the OS locale is.
+ $this->process->setEnv($env);
+ }
+
+ $this->process->start();
+ $this->process->wait();
+ }
+
+ /**
+ * Checks whether previously ran command passes|fails with provided output.
+ *
+ * @Then /^it should (fail|pass) with:$/
+ *
+ * @param string $success "fail" or "pass"
+ * @param PyStringNode $text PyString text instance
+ */
+ public function itShouldPassWith($success, PyStringNode $text)
+ {
+ $this->itShouldFail($success);
+ $this->theOutputShouldContain($text);
+ }
+
+ /**
+ * Checks whether specified file exists and contains specified string.
+ *
+ * @Then /^"([^"]*)" file should contain:$/
+ *
+ * @param string $path file path
+ * @param PyStringNode $text file content
+ */
+ public function fileShouldContain($path, PyStringNode $text)
+ {
+ $path = $this->workingDir . '/' . $path;
+ PHPUnit_Framework_Assert::assertFileExists($path);
+
+ $fileContent = trim(file_get_contents($path));
+ // Normalize the line endings in the output
+ if ("\n" !== PHP_EOL) {
+ $fileContent = str_replace(PHP_EOL, "\n", $fileContent);
+ }
+
+ PHPUnit_Framework_Assert::assertEquals($this->getExpectedOutput($text), $fileContent);
+ }
+
+ /**
+ * Checks whether last command output contains provided string.
+ *
+ * @Then the output should contain:
+ *
+ * @param PyStringNode $text PyString text instance
+ */
+ public function theOutputShouldContain(PyStringNode $text)
+ {
+ PHPUnit_Framework_Assert::assertContains($this->getExpectedOutput($text), $this->getOutput());
+ }
+
+ private function getExpectedOutput(PyStringNode $expectedText)
+ {
+ $text = strtr($expectedText, array('\'\'\'' => '"""', '%%TMP_DIR%%' => sys_get_temp_dir() . DIRECTORY_SEPARATOR));
+
+ // windows path fix
+ if ('/' !== DIRECTORY_SEPARATOR) {
+ $text = preg_replace_callback(
+ '/ features\/[^\n ]+/', function ($matches) {
+ return str_replace('/', DIRECTORY_SEPARATOR, $matches[0]);
+ }, $text
+ );
+ $text = preg_replace_callback(
+ '/\features\/[^\<]+/', function ($matches) {
+ return str_replace('/', DIRECTORY_SEPARATOR, $matches[0]);
+ }, $text
+ );
+ $text = preg_replace_callback(
+ '/\+[fd] [^ ]+/', function ($matches) {
+ return str_replace('/', DIRECTORY_SEPARATOR, $matches[0]);
+ }, $text
+ );
+ }
+
+ return $text;
+ }
+
+ /**
+ * Checks whether previously ran command failed|passed.
+ *
+ * @Then /^it should (fail|pass)$/
+ *
+ * @param string $success "fail" or "pass"
+ */
+ public function itShouldFail($success)
+ {
+ if ('fail' === $success) {
+ if (0 === $this->getExitCode()) {
+ echo 'Actual output:' . PHP_EOL . PHP_EOL . $this->getOutput();
+ }
+
+ PHPUnit_Framework_Assert::assertNotEquals(0, $this->getExitCode());
+ } else {
+ if (0 !== $this->getExitCode()) {
+ echo 'Actual output:' . PHP_EOL . PHP_EOL . $this->getOutput();
+ }
+
+ PHPUnit_Framework_Assert::assertEquals(0, $this->getExitCode());
+ }
+ }
+
+ private function getExitCode()
+ {
+ return $this->process->getExitCode();
+ }
+
+ private function getOutput()
+ {
+ $output = $this->process->getErrorOutput() . $this->process->getOutput();
+
+ // Normalize the line endings in the output
+ if ("\n" !== PHP_EOL) {
+ $output = str_replace(PHP_EOL, "\n", $output);
+ }
+
+ // Replace wrong warning message of HHVM
+ $output = str_replace('Notice: Undefined index: ', 'Notice: Undefined offset: ', $output);
+
+ return trim(preg_replace("/ +$/m", '', $output));
+ }
+
+ private function createFile($filename, $content)
+ {
+ $path = dirname($filename);
+ if (!is_dir($path)) {
+ mkdir($path, 0777, true);
+ }
+
+ file_put_contents($filename, $content);
+ }
+
+ private function moveToNewPath($path)
+ {
+ $newWorkingDir = $this->workingDir .'/' . $path;
+ if (!file_exists($newWorkingDir)) {
+ mkdir($newWorkingDir, 0777, true);
+ }
+
+ $this->workingDir = $newWorkingDir;
+ }
+
+ private static function clearDirectory($path)
+ {
+ $files = scandir($path);
+ array_shift($files);
+ array_shift($files);
+
+ foreach ($files as $file) {
+ $file = $path . DIRECTORY_SEPARATOR . $file;
+ if (is_dir($file)) {
+ self::clearDirectory($file);
+ } else {
+ unlink($file);
+ }
+ }
+
+ rmdir($path);
+ }
+}
diff --git a/vendor/behat/behat/features/config.feature b/vendor/behat/behat/features/config.feature
new file mode 100644
index 0000000..31f7502
--- /dev/null
+++ b/vendor/behat/behat/features/config.feature
@@ -0,0 +1,37 @@
+Feature: Config
+ In order to configure behat for my needs
+ As a feature automator
+ I need to be able to use behat configuration file
+
+ Scenario: Empty configuration file
+ Given a file named "behat.yml" with:
+ """
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ parameters = $parameters;
+ }
+
+ public function setExtensionParameters(array $parameters) {
+ $this->extension = $parameters;
+ }
+
+ /** @When this scenario executes */
+ public function thisScenarioExecutes() {}
+
+ /** @Then the context parameters should be overwritten */
+ public function theContextParametersOverwrite() {
+ \PHPUnit_Framework_Assert::assertEquals(array('param2' => 'val2'), $this->parameters);
+ }
+
+ /** @Then the extension config should be merged */
+ public function theExtensionConfigMerge() {
+ \PHPUnit_Framework_Assert::assertEquals(array('param1' => 'val2', 'param2' => 'val1'), $this->extension);
+ }
+ }
+ """
+ And a file named "custom_extension.php" with:
+ """
+ parameters = $parameters;
+ }
+
+ public function supportsContext(Context $context)
+ {
+ return true;
+ }
+
+ public function initializeContext(Context $context)
+ {
+ $context->setExtensionParameters($this->parameters);
+ }
+ }
+
+ class CustomExtension implements Extension
+ {
+ public function getConfigKey()
+ {
+ return 'custom';
+ }
+
+ public function configure(ArrayNodeDefinition $builder)
+ {
+ $builder->useAttributeAsKey('name')->prototype('variable');
+ }
+
+ public function initialize(ExtensionManager $extensionManager) {}
+
+ public function load(ContainerBuilder $container, array $config)
+ {
+ $definition = $container->register('custom_initializer', 'CustomInitializer');
+ $definition->setArguments(array($config));
+ $definition->addTag('context.initializer', array('priority' => 100));
+ }
+
+ public function process(ContainerBuilder $container) {}
+ }
+
+ return new CustomExtension;
+ """
+ And a file named "features/configs.feature" with:
+ """
+ Feature:
+ Scenario:
+ When this scenario executes
+ Then the context parameters should be overwritten
+ And the extension config should be merged
+ """
+
+ Scenario: Config should successfully inherit parent one for default profiles
+ When I run "behat -f progress --append-snippets"
+ Then it should pass
+
+ Scenario: Config should successfully inherit parent one for custom profiles
+ When I run "behat -f progress --append-snippets --profile custom_profile"
+ Then it should pass
diff --git a/vendor/behat/behat/features/config_reference.feature b/vendor/behat/behat/features/config_reference.feature
new file mode 100644
index 0000000..0302652
--- /dev/null
+++ b/vendor/behat/behat/features/config_reference.feature
@@ -0,0 +1,73 @@
+Feature: Config reference
+ In order to know the available configuration
+ As a Behat user
+ I need to be able to dump the configuration reference
+
+ Scenario: Reference of defaults extension
+ When I run "behat --no-colors --config-reference -v"
+ Then it should pass
+ And the output should contain:
+ """
+ suites:
+ """
+ And the output should contain:
+ """
+ exceptions:
+ """
+
+ Scenario: Custom extension
+ Given a file named "behat.yml" with:
+ """
+ default:
+ extensions:
+ custom_extension.php: ~
+ """
+ And a file named "custom_extension.php" with:
+ """
+ children()
+ ->scalarNode('child')->info('A child node')->end()
+ ->booleanNode('test')->defaultTrue()->end()
+ ->end();
+ }
+
+ public function initialize(Behat\Testwork\ServiceContainer\ExtensionManager $extensionManager) {}
+
+ public function load(ContainerBuilder $container, array $config) {}
+
+ public function process(ContainerBuilder $container) {}
+ }
+
+ return new CustomExtension;
+ """
+ When I run "behat --no-colors --config-reference"
+ Then it should pass
+ And the output should contain:
+ """
+ custom_extension:
+
+ # A child node
+ child: ~
+ test: true
+ """
+ And the output should contain:
+ """
+ # A child node
+ """
+ And the output should contain:
+ """
+ test: true
+ """
diff --git a/vendor/behat/behat/features/context.feature b/vendor/behat/behat/features/context.feature
new file mode 100644
index 0000000..40b1487
--- /dev/null
+++ b/vendor/behat/behat/features/context.feature
@@ -0,0 +1,380 @@
+Feature: Context consistency
+ In order to maintain stable behavior tests
+ As a feature writer
+ I need a separate context for every scenario/outline
+
+ Background:
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ parameters = array('parameter1' => $parameter1, 'parameter2' => $parameter2);
+ }
+
+ /**
+ * @Given /^I have (\d+) apples?$/
+ */
+ public function iHaveApples($count) {
+ $this->apples = intval($count);
+ }
+
+ /**
+ * @When /^I ate (\d+) apples?$/
+ */
+ public function iAteApples($count) {
+ $this->apples -= intval($count);
+ }
+
+ /**
+ * @When /^I found (\d+) apples?$/
+ */
+ public function iFoundApples($count) {
+ $this->apples += intval($count);
+ }
+
+ /**
+ * @Then /^I should have (\d+) apples$/
+ */
+ public function iShouldHaveApples($count) {
+ PHPUnit_Framework_Assert::assertEquals(intval($count), $this->apples);
+ }
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be equal to "([^"]*)"$/
+ */
+ public function contextParameterShouldBeEqualTo($key, $val) {
+ PHPUnit_Framework_Assert::assertEquals($val, $this->parameters[$key]);
+ }
+
+ /**
+ * @Given /^context parameter "([^"]*)" should be array with (\d+) elements$/
+ */
+ public function contextParameterShouldBeArrayWithElements($key, $count) {
+ PHPUnit_Framework_Assert::assertInternalType('array', $this->parameters[$key]);
+ PHPUnit_Framework_Assert::assertEquals(2, count($this->parameters[$key]));
+ }
+ }
+
+ class FeatureContext extends CoreContext implements CustomSnippetAcceptingContext
+ {
+ public static function getAcceptedSnippetType() { return 'regex'; }
+ }
+ """
+ And a file named "features/bootstrap/CustomContext.php" with:
+ """
+ apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 5 | 8 |
+ | 2 | 2 | 3 |
+ """
+ When I run "behat --no-colors -f progress features/apples.feature"
+ Then it should pass with:
+ """
+ ..................
+
+ 5 scenarios (5 passed)
+ 18 steps (18 passed)
+ """
+
+ Scenario: False "apples story"
+ Given a file named "features/apples.feature" with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ Then I should have 5 apples
+
+ Scenario: Found more apples
+ When I found 10 apples
+ Then I should have 10 apples
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 3 |
+ | 0 | 5 | 8 |
+ | 2 | 2 | 4 |
+ """
+ When I run "behat --no-colors -f progress features/apples.feature"
+ Then it should fail with:
+ """
+ ..F..F...F.......F
+
+ --- Failed steps:
+
+ Then I should have 5 apples # features/apples.feature:11
+ Failed asserting that 2 matches expected 5.
+
+ Then I should have 10 apples # features/apples.feature:15
+ Failed asserting that 13 matches expected 10.
+
+ Then I should have 3 apples # features/apples.feature:20
+ Failed asserting that 1 matches expected 3.
+
+ Then I should have 4 apples # features/apples.feature:20
+ Failed asserting that 3 matches expected 4.
+
+ 5 scenarios (1 passed, 4 failed)
+ 18 steps (14 passed, 4 failed)
+ """
+
+ Scenario: Context parameters
+ Given a file named "behat.yml" with:
+ """
+ default:
+ suites:
+ default:
+ contexts:
+ - FeatureContext:
+ parameter1: val_one
+ parameter2:
+ everzet: behat_admin
+ avalanche123: behat_admin
+ """
+ And a file named "features/params.feature" with:
+ """
+ Feature: Context parameters
+ In order to run a browser
+ As feature runner
+ I need to be able to configure behat context
+
+ Scenario: I'm little hungry
+ Then context parameter "parameter1" should be equal to "val_one"
+ And context parameter "parameter2" should be array with 2 elements
+ """
+ When I run "behat --no-colors -f progress features/params.feature"
+ Then it should pass with:
+ """
+ ..
+
+ 1 scenario (1 passed)
+ 2 steps (2 passed)
+ """
+
+ Scenario: Context parameters including optional
+ Given a file named "behat.yml" with:
+ """
+ default:
+ suites:
+ default:
+ contexts:
+ - FeatureContext:
+ parameter1: val_one
+ """
+ And a file named "features/params.feature" with:
+ """
+ Feature: Context parameters
+ In order to run a browser
+ As feature runner
+ I need to be able to configure behat context
+
+ Scenario: I'm little hungry
+ Then context parameter "parameter1" should be equal to "val_one"
+ Then context parameter "parameter2" should be equal to "val2_default"
+ """
+ When I run "behat --no-colors -f progress features/params.feature"
+ Then it should pass with:
+ """
+ ..
+
+ 1 scenario (1 passed)
+ 2 steps (2 passed)
+ """
+
+ Scenario: Existing custom context class
+ Given a file named "behat.yml" with:
+ """
+ default:
+ suites:
+ default:
+ contexts: [ CustomContext ]
+ """
+ And a file named "features/params.feature" with:
+ """
+ Feature: Context parameters
+ In order to run a browser
+ As feature runner
+ I need to be able to configure behat context
+
+ Scenario: I'm little hungry
+ Then context parameter "parameter1" should be equal to "val_one"
+ And context parameter "parameter2" should be array with 2 elements
+ """
+ When I run "behat --no-colors -f progress features/params.feature"
+ Then it should pass with:
+ """
+ UU
+
+ 1 scenario (1 undefined)
+ 2 steps (2 undefined)
+
+ --- CustomContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be equal to "([^"]*)"$/
+ */
+ public function contextParameterShouldBeEqualTo($arg1, $arg2)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be array with (\d+) elements$/
+ */
+ public function contextParameterShouldBeArrayWithElements($arg1, $arg2)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: Single context class instead of an array provided as `contexts` option
+ Given a file named "behat.yml" with:
+ """
+ default:
+ suites:
+ default:
+ contexts: UnexistentContext
+ """
+ And a file named "features/params.feature" with:
+ """
+ Feature: Context parameters
+ In order to run a browser
+ As feature runner
+ I need to be able to configure behat context
+
+ Scenario: I'm little hungry
+ Then context parameter "parameter1" should be equal to "val_one"
+ And context parameter "parameter2" should be array with 2 elements
+ """
+ When I run "behat --no-colors -f progress features/params.feature"
+ Then it should fail with:
+ """
+ [Behat\Testwork\Suite\Exception\SuiteConfigurationException]
+ `contexts` setting of the "default" suite is expected to be an array, string given.
+
+
+
+ behat [-s|--suite="..."] [-f|--format="..."] [-o|--out="..."] [--format-settings="..."] [--init] [--lang="..."] [--name="..."] [--tags="..."] [--role="..."] [--story-syntax] [-d|--definitions="..."] [--append-snippets] [--no-snippets] [--strict] [--rerun] [--stop-on-failure] [--dry-run] [paths]
+ """
+
+ Scenario: Unexisting custom context class
+ Given a file named "behat.yml" with:
+ """
+ default:
+ suites:
+ default:
+ contexts: [ UnexistentContext ]
+ """
+ And a file named "features/params.feature" with:
+ """
+ Feature: Context parameters
+ In order to run a browser
+ As feature runner
+ I need to be able to configure behat context
+
+ Scenario: I'm little hungry
+ Then context parameter "parameter1" should be equal to "val_one"
+ And context parameter "parameter2" should be array with 2 elements
+ """
+ When I run "behat --no-colors -f progress features/params.feature"
+ Then it should fail with:
+ """
+ [Behat\Behat\Context\Exception\ContextNotFoundException]
+ `UnexistentContext` context class not found and can not be used.
+
+
+
+ behat [-s|--suite="..."] [-f|--format="..."] [-o|--out="..."] [--format-settings="..."] [--init] [--lang="..."] [--name="..."] [--tags="..."] [--role="..."] [--story-syntax] [-d|--definitions="..."] [--append-snippets] [--no-snippets] [--strict] [--rerun] [--stop-on-failure] [--dry-run] [paths]
+ """
+
+ Scenario: Unexisting context argument
+ Given a file named "behat.yml" with:
+ """
+ default:
+ suites:
+ default:
+ contexts:
+ - FeatureContext:
+ unexistingParam: 'value'
+ """
+ And a file named "features/params.feature" with:
+ """
+ Feature: Context parameters
+ In order to run a browser
+ As feature runner
+ I need to be able to configure behat context
+
+ Scenario: I'm little hungry
+ Then context parameter "parameter1" should be equal to "val_one"
+ And context parameter "parameter2" should be array with 2 elements
+ """
+ When I run "behat --no-colors -f progress features/params.feature"
+ Then it should fail with:
+ """
+ [Behat\Testwork\Argument\Exception\UnknownParameterValueException]
+ `CoreContext::__construct()` does not expect argument `$unexistingParam`.
+
+
+
+ behat [-s|--suite="..."] [-f|--format="..."] [-o|--out="..."] [--format-settings="..."] [--init] [--lang="..."] [--name="..."] [--tags="..."] [--role="..."] [--story-syntax] [-d|--definitions="..."] [--append-snippets] [--no-snippets] [--strict] [--rerun] [--stop-on-failure] [--dry-run] [paths]
+ """
diff --git a/vendor/behat/behat/features/definitions_override.feature b/vendor/behat/behat/features/definitions_override.feature
new file mode 100644
index 0000000..464a63c
--- /dev/null
+++ b/vendor/behat/behat/features/definitions_override.feature
@@ -0,0 +1,78 @@
+Feature: Step Definitions Override
+ In order to fine-tune definitions defined in parent classes
+ As a step definitions developer
+ I need to be able to override definition methods
+
+ Scenario: Overriden method without own annotation will inherit parent pattern
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ .*)")? should(? not)? be:$/
+ */
+ public function checkEquality($path = null, $isNegative = null, PyStringNode $json = null)
+ {
+ PHPUnit_Framework_Assert::assertNull($path);
+ PHPUnit_Framework_Assert::assertNull($isNegative);
+ PHPUnit_Framework_Assert::assertNotNull($json);
+ }
+
+ /**
+ * @Then /^the other (?:JSON|json)(?: response)?(?: at "(?.*)")? should(? not)? be:$/
+ */
+ public function checkEquality2($json = null, $path = null, $isNegative = null)
+ {
+ PHPUnit_Framework_Assert::assertNull($path);
+ PHPUnit_Framework_Assert::assertNull($isNegative);
+ PHPUnit_Framework_Assert::assertNotNull($json);
+ }
+ }
+ """
+ And a file named "features/step_patterns.feature" with:
+ """
+ Feature: Step Pattern
+ Scenario:
+ Then the JSON should be:
+ '''
+ Test
+ '''
+ And the other JSON should be:
+ '''
+ Test
+ '''
+ """
+ When I run "behat -f progress --no-colors"
+ Then it should pass with:
+ """
+ ..
+
+ 1 scenario (1 passed)
+ 2 steps (2 passed)
+ """
+
+ Scenario: Definition parameter with decimal number following string
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ username = $username;
+ $this->age = $age;
+ }
+
+ public function getUsername() { return $this->username; }
+ public function getAge() { return $this->age; }
+ }
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ getHash();
+ $username = $hash[0]['username'];
+ $age = $hash[0]['age'];
+
+ return new User($username, $age);
+ }
+
+ /** @Transform /^\d+$/ */
+ public function castToNumber($number) {
+ return intval($number);
+ }
+
+ /** @Transform :user */
+ public function castToUser($username) {
+ return new User($username);
+ }
+
+ /**
+ * @Transform /^(yes|no)$/
+ */
+ public function castEinenOrKeinenToBoolean($expected) {
+ return 'yes' === $expected;
+ }
+
+ /**
+ * @Given /I am (".*" user)/
+ * @Given I am user:
+ * @Given I am :user
+ */
+ public function iAmUser(User $user) {
+ $this->user = $user;
+ }
+
+ /**
+ * @Then /Username must be "([^"]+)"/
+ */
+ public function usernameMustBe($username) {
+ PHPUnit_Framework_Assert::assertEquals($username, $this->user->getUsername());
+ }
+
+ /**
+ * @Then /Age must be (\d+)/
+ */
+ public function ageMustBe($age) {
+ PHPUnit_Framework_Assert::assertEquals($age, $this->user->getAge());
+ PHPUnit_Framework_Assert::assertInternalType('int', $age);
+ }
+
+ /**
+ * @Then /^the boolean (no) should be transformed to false$/
+ */
+ public function theBooleanShouldBeTransformed($boolean) {
+ PHPUnit_Framework_Assert::assertSame(false, $boolean);
+ }
+ }
+ """
+
+ Scenario: Simple Arguments Transformations
+ Given a file named "features/step_arguments.feature" with:
+ """
+ Feature: Step Arguments
+ Scenario:
+ Given I am "everzet" user
+ Then Username must be "everzet"
+ And Age must be 20
+ And the boolean no should be transformed to false
+
+ Scenario:
+ Given I am "antono - 29" user
+ Then Username must be "antono"
+ And Age must be 29
+ """
+ When I run "behat -f progress --no-colors"
+ Then it should pass with:
+ """
+ .......
+
+ 2 scenarios (2 passed)
+ 7 steps (7 passed)
+ """
+
+ Scenario: Table Arguments Transformations
+ Given a file named "features/table_arguments.feature" with:
+ """
+ Feature: Step Arguments
+ Scenario:
+ Given I am user:
+ | username | age |
+ | ever.zet | 22 |
+ Then Username must be "ever.zet"
+ And Age must be 22
+
+ Scenario:
+ Given I am user:
+ | username | age |
+ | vasiljev | 30 |
+ Then Username must be "vasiljev"
+ And Age must be 30
+ """
+ When I run "behat -f progress --no-colors"
+ Then it should pass with:
+ """
+ ......
+
+ 2 scenarios (2 passed)
+ 6 steps (6 passed)
+ """
+
+ Scenario: Named Arguments Transformations
+ Given a file named "features/step_arguments.feature" with:
+ """
+ Feature: Step Arguments
+ Scenario:
+ Given I am "everzet"
+ Then Username must be "everzet"
+
+ Scenario:
+ Given I am "antono"
+ Then Username must be "antono"
+ """
+ When I run "behat -f progress --no-colors"
+ Then it should pass with:
+ """
+ ....
+
+ 2 scenarios (2 passed)
+ 4 steps (4 passed)
+ """
+
+ Scenario: Transforming different types
+ Given a file named "features/to_null.feature" with:
+ """
+ Feature: I should be able to transform values into different types for testing
+
+ Scenario Outline: Converting different types
+ Given I have the value ""
+ Then it should be of type ""
+
+ Examples:
+ | value | type |
+ | "soeuhtou" | string |
+ | 34 | integer |
+ | null | NULL |
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ value);
+ }
+
+ /**
+ * @Transform /^".*"$/
+ */
+ public function transformString($string)
+ {
+ return strval($string);
+ }
+
+ /**
+ * @Transform /^\d+$/
+ */
+ public function transformInt($int)
+ {
+ return intval($int);
+ }
+
+ /**
+ * @Transform /^null/
+ */
+ public function transformNull($null)
+ {
+ return null;
+ }
+
+ /**
+ * @Given I have the value ":value"
+ */
+ public function iHaveTheValue($value)
+ {
+ $this->value = $value;
+ }
+
+ /**
+ * @Then it should be of type :type
+ */
+ public function itShouldBeOfType($type)
+ {
+ if (gettype($this->value) != $type) {
+ throw new Exception("Expected " . $type . ", got " . gettype($this->value) . " (value: " . $this->value . ")");
+ }
+ }
+ }
+ """
+ When I run "behat -f progress --no-colors"
+ Then it should pass with:
+ """
+ ......
+
+ 3 scenarios (3 passed)
+ 6 steps (6 passed)
+ """
diff --git a/vendor/behat/behat/features/definitions_translations.feature b/vendor/behat/behat/features/definitions_translations.feature
new file mode 100644
index 0000000..df41e94
--- /dev/null
+++ b/vendor/behat/behat/features/definitions_translations.feature
@@ -0,0 +1,361 @@
+Feature: Definitions translations
+ In order to be able to use predefined steps in native language
+ As a step definitions developer
+ I need to be able to write definition translations
+
+ Scenario: In place XLIFF translations
+ Given a file named "features/calc_ru.feature" with:
+ """
+ # language: ru
+ Функция: Базовая калькуляция
+
+ Сценарий:
+ Допустим Я набрал число 10 на калькуляторе
+ И Я набрал число 4 на калькуляторе
+ И Я нажал "+"
+ То Я должен увидеть на экране 14
+ И пользователь "everzet" должен иметь имя "everzet"
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ numbers[] = intval($number);
+ }
+
+ /**
+ * @Given /^I have clicked "+"$/
+ */
+ public function iHaveClickedPlus() {
+ $this->result = array_sum($this->numbers);
+ }
+
+ /**
+ * @Then /^I should see (\d+) on the screen$/
+ */
+ public function iShouldSeeOnTheScreen($result) {
+ PHPUnit_Framework_Assert::assertEquals(intval($result), $this->result);
+ }
+
+ /** @Transform /"([^"]+)" user/ */
+ public static function createUserFromUsername($username) {
+ return (Object) array('name' => $username);
+ }
+
+ /**
+ * @Then /^the ("[^"]+" user) name should be "([^"]*)"$/
+ */
+ public function theUserUsername($user, $username) {
+ PHPUnit_Framework_Assert::assertEquals($username, $user->name);
+ }
+
+ public static function getTranslationResources() {
+ return array(__DIR__ . DIRECTORY_SEPARATOR . 'i18n' . DIRECTORY_SEPARATOR . 'ru.xliff');
+ }
+ }
+ """
+ And a file named "features/bootstrap/i18n/ru.xliff" with:
+ """
+
+
+
+
+
+ /^I have entered (\d+) into calculator$/
+ /^Я набрал число (\d+) на калькуляторе$/
+
+
+ /^I have clicked "+"$/
+ /^Я нажал "([^"]*)"$/
+
+
+ /^I should see (\d+) on the screen$/
+ /^Я должен увидеть на экране (\d+)$/
+
+
+ /"([^"]+)" user/
+ /пользователь "([^"]+)"/
+
+
+ /^the ("[^"]+" user) name should be "([^"]*)"$/
+ /^(пользователь "[^"]+") должен иметь имя "([^"]*)"$/
+
+
+
+
+ """
+ When I run "behat --no-colors -f progress features/calc_ru.feature"
+ Then it should pass with:
+ """
+ .....
+
+ 1 scenario (1 passed)
+ 5 steps (5 passed)
+ """
+
+ Scenario: In place YAML translations
+ Given a file named "features/calc_ru.feature" with:
+ """
+ # language: ru
+ Функция: Базовая калькуляция
+
+ Сценарий:
+ Допустим Я набрал число 10 на калькуляторе
+ И Я набрал число 4 на калькуляторе
+ И Я нажал "+"
+ То Я должен увидеть на экране 14
+ И пользователь "everzet" должен иметь имя "everzet"
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ numbers[] = intval($number);
+ }
+
+ /**
+ * @Given /^I have clicked "+"$/
+ */
+ public function iHaveClickedPlus() {
+ $this->result = array_sum($this->numbers);
+ }
+
+ /**
+ * @Then /^I should see (\d+) on the screen$/
+ */
+ public function iShouldSeeOnTheScreen($result) {
+ PHPUnit_Framework_Assert::assertEquals(intval($result), $this->result);
+ }
+
+ /** @Transform /"([^"]+)" user/ */
+ public static function createUserFromUsername($username) {
+ return (Object) array('name' => $username);
+ }
+
+ /**
+ * @Then /^the ("[^"]+" user) name should be "([^"]*)"$/
+ */
+ public function theUserUsername($user, $username) {
+ PHPUnit_Framework_Assert::assertEquals($username, $user->name);
+ }
+
+ public static function getTranslationResources() {
+ return array(__DIR__ . DIRECTORY_SEPARATOR . 'i18n' . DIRECTORY_SEPARATOR . 'ru.yml');
+ }
+ }
+ """
+ And a file named "features/bootstrap/i18n/ru.yml" with:
+ """
+ '/^I have entered (\d+) into calculator$/': '/^Я набрал число (\d+) на калькуляторе$/'
+ '/^I have clicked "+"$/': '/^Я нажал "([^"]*)"$/'
+ '/^I should see (\d+) on the screen$/': '/^Я должен увидеть на экране (\d+)$/'
+ '/"([^"]+)" user/': '/пользователь "([^"]+)"/'
+ '/^the ("[^"]+" user) name should be "([^"]*)"$/': '/^(пользователь "[^"]+") должен иметь имя "([^"]*)"$/'
+ """
+ When I run "behat --no-colors -f progress features/calc_ru.feature"
+ Then it should pass with:
+ """
+ .....
+
+ 1 scenario (1 passed)
+ 5 steps (5 passed)
+ """
+
+ Scenario: In place PHP translations
+ Given a file named "features/calc_ru.feature" with:
+ """
+ # language: ru
+ Функция: Базовая калькуляция
+
+ Сценарий:
+ Допустим Я набрал число 10 на калькуляторе
+ И Я набрал число 4 на калькуляторе
+ И Я нажал "+"
+ То Я должен увидеть на экране 14
+ И пользователь "everzet" должен иметь имя "everzet"
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ numbers[] = intval($number);
+ }
+
+ /**
+ * @Given /^I have clicked "+"$/
+ */
+ public function iHaveClickedPlus() {
+ $this->result = array_sum($this->numbers);
+ }
+
+ /**
+ * @Then /^I should see (\d+) on the screen$/
+ */
+ public function iShouldSeeOnTheScreen($result) {
+ PHPUnit_Framework_Assert::assertEquals(intval($result), $this->result);
+ }
+
+ /** @Transform /"([^"]+)" user/ */
+ public static function createUserFromUsername($username) {
+ return (Object) array('name' => $username);
+ }
+
+ /**
+ * @Then /^the ("[^"]+" user) name should be "([^"]*)"$/
+ */
+ public function theUserUsername($user, $username) {
+ PHPUnit_Framework_Assert::assertEquals($username, $user->name);
+ }
+
+ public static function getTranslationResources() {
+ return array(__DIR__ . DIRECTORY_SEPARATOR . 'i18n' . DIRECTORY_SEPARATOR . 'ru.php');
+ }
+ }
+ """
+ And a file named "features/bootstrap/i18n/ru.php" with:
+ """
+ '/^Я набрал число (\d+) на калькуляторе$/',
+ '/^I have clicked "+"$/' => '/^Я нажал "([^"]*)"$/',
+ '/^I should see (\d+) on the screen$/' => '/^Я должен увидеть на экране (\d+)$/',
+ '/"([^"]+)" user/' => '/пользователь "([^"]+)"/',
+ '/^the ("[^"]+" user) name should be "([^"]*)"$/' => '/^(пользователь "[^"]+") должен иметь имя "([^"]*)"$/',
+ );
+ """
+ When I run "behat --no-colors -f progress features/calc_ru.feature"
+ Then it should pass with:
+ """
+ .....
+
+ 1 scenario (1 passed)
+ 5 steps (5 passed)
+ """
+
+ Scenario: Translations with 2 suites
+ Given a file named "behat.yml" with:
+ """
+ default:
+ suites:
+ frontend: ~
+ backend: ~
+ """
+ Given a file named "features/calc_ru.feature" with:
+ """
+ # language: ru
+ Функция: Базовая калькуляция
+
+ Сценарий:
+ Допустим Я набрал число 10 на калькуляторе
+ И Я набрал число 4 на калькуляторе
+ И Я нажал "+"
+ То Я должен увидеть на экране 14
+ И пользователь "everzet" должен иметь имя "everzet"
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ numbers[] = intval($number);
+ }
+
+ /**
+ * @Given /^I have clicked "+"$/
+ */
+ public function iHaveClickedPlus() {
+ $this->result = array_sum($this->numbers);
+ }
+
+ /**
+ * @Then /^I should see (\d+) on the screen$/
+ */
+ public function iShouldSeeOnTheScreen($result) {
+ PHPUnit_Framework_Assert::assertEquals(intval($result), $this->result);
+ }
+
+ /** @Transform /"([^"]+)" user/ */
+ public static function createUserFromUsername($username) {
+ return (Object) array('name' => $username);
+ }
+
+ /**
+ * @Then /^the ("[^"]+" user) name should be "([^"]*)"$/
+ */
+ public function theUserUsername($user, $username) {
+ PHPUnit_Framework_Assert::assertEquals($username, $user->name);
+ }
+
+ public static function getTranslationResources() {
+ return array(__DIR__ . DIRECTORY_SEPARATOR . 'i18n' . DIRECTORY_SEPARATOR . 'ru.php');
+ }
+ }
+ """
+ And a file named "features/bootstrap/i18n/ru.php" with:
+ """
+ '/^Я набрал число (\d+) на калькуляторе$/',
+ '/^I have clicked "+"$/' => '/^Я нажал "([^"]*)"$/',
+ '/^I should see (\d+) on the screen$/' => '/^Я должен увидеть на экране (\d+)$/',
+ '/"([^"]+)" user/' => '/пользователь "([^"]+)"/',
+ '/^the ("[^"]+" user) name should be "([^"]*)"$/' => '/^(пользователь "[^"]+") должен иметь имя "([^"]*)"$/',
+ );
+ """
+ When I run "behat --no-colors -f progress features/calc_ru.feature"
+ Then it should pass with:
+ """
+ ..........
+
+ 2 scenarios (2 passed)
+ 10 steps (10 passed)
+ """
diff --git a/vendor/behat/behat/features/dry_run.feature b/vendor/behat/behat/features/dry_run.feature
new file mode 100644
index 0000000..961786c
--- /dev/null
+++ b/vendor/behat/behat/features/dry_run.feature
@@ -0,0 +1,219 @@
+Feature: Dry run
+ In order to print formatters output without executing steps
+ As a feature developer
+ I need to have a --dry-run option
+
+ Background:
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ | 2 | 2 | 3 |
+ """
+
+ Scenario: Just run feature
+ When I run "behat --no-colors --format-settings='{\"paths\": false}' features/apples.feature"
+ Then it should pass with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+ │ STEP: I have 3 apples
+
+ ┌─ @BeforeScenario # FeatureContext::beforeScenario()
+ │
+ │ HOOK: before scenario
+ │
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ │ STEP: I ate 1 apples
+ Then I should have 3 apples
+ │ STEP: I should have 3 apples
+
+ ┌─ @BeforeScenario # FeatureContext::beforeScenario()
+ │
+ │ HOOK: before scenario
+ │
+ Scenario: Found more apples
+ Given I have 3 apples
+ │ STEP: I have 3 apples
+ When I found 5 apples
+ │ STEP: I found 5 apples
+ Then I should have 8 apples
+ │ STEP: I should have 8 apples
+
+ ┌─ @BeforeScenario # FeatureContext::beforeScenario()
+ │
+ │ HOOK: before scenario
+ │
+ Scenario: Found more apples
+ Given I have 3 apples
+ │ STEP: I have 3 apples
+ When I found 2 apples
+ │ STEP: I found 2 apples
+ Then I should have 5 apples
+ │ STEP: I should have 5 apples
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ ┌─ @BeforeScenario # FeatureContext::beforeScenario()
+ │
+ │ HOOK: before scenario
+ │
+ | 3 | 1 | 1 |
+ │ STEP: I have 3 apples
+ │ STEP: I ate 3 apples
+ │ STEP: I found 1 apples
+ │ STEP: I should have 1 apples
+ ┌─ @BeforeScenario # FeatureContext::beforeScenario()
+ │
+ │ HOOK: before scenario
+ │
+ | 0 | 4 | 8 |
+ │ STEP: I have 3 apples
+ │ STEP: I ate 0 apples
+ │ STEP: I found 4 apples
+ │ STEP: I should have 8 apples
+ ┌─ @BeforeScenario # FeatureContext::beforeScenario()
+ │
+ │ HOOK: before scenario
+ │
+ | 2 | 2 | 3 |
+ │ STEP: I have 3 apples
+ │ STEP: I ate 2 apples
+ │ STEP: I found 2 apples
+ │ STEP: I should have 3 apples
+
+ 6 scenarios (6 passed)
+ 21 steps (21 passed)
+ """
+
+ Scenario: Run feature with --dry-run
+ When I run "behat --no-colors --dry-run features/apples.feature"
+ Then it should pass with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background: # features/apples.feature:6
+ Given I have 3 apples # FeatureContext::iHaveApples()
+
+ Scenario: I'm little hungry # features/apples.feature:9
+ When I ate 1 apple # FeatureContext::iAteApples()
+ Then I should have 3 apples # FeatureContext::iShouldHaveApples()
+
+ Scenario: Found more apples # features/apples.feature:13
+ When I found 5 apples # FeatureContext::iFoundApples()
+ Then I should have 8 apples # FeatureContext::iShouldHaveApples()
+
+ Scenario: Found more apples # features/apples.feature:17
+ When I found 2 apples # FeatureContext::iFoundApples()
+ Then I should have 5 apples # FeatureContext::iShouldHaveApples()
+
+ Scenario Outline: Other situations # features/apples.feature:21
+ When I ate apples # FeatureContext::iAteApples()
+ And I found apples # FeatureContext::iFoundApples()
+ Then I should have apples # FeatureContext::iShouldHaveApples()
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ | 2 | 2 | 3 |
+
+ --- Skipped scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:13
+ features/apples.feature:17
+ features/apples.feature:28
+ features/apples.feature:29
+ features/apples.feature:30
+
+ 6 scenarios (6 skipped)
+ 21 steps (21 skipped)
+ """
diff --git a/vendor/behat/behat/features/empty_feature.feature b/vendor/behat/behat/features/empty_feature.feature
new file mode 100644
index 0000000..42e7854
--- /dev/null
+++ b/vendor/behat/behat/features/empty_feature.feature
@@ -0,0 +1,28 @@
+Feature: Empty feature
+ In order to follow BDD practice without a hassle
+ As a BDD practitioner
+ I need to be able to leave scenario titles without steps for time being
+
+ Scenario: Empty scenario
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ array = array();
+ }
+
+ /**
+ * @When /^I access array index (\d+)$/
+ */
+ public function iAccessArrayIndex($arg1)
+ {
+ $index = intval($arg1);
+ $this->result = $this->array[$index];
+ }
+
+ /**
+ * @Then /^I should get NULL$/
+ */
+ public function iShouldGetNull()
+ {
+ PHPUnit_Framework_Assert::assertNull($this->result);
+ }
+
+ /**
+ * @When /^I push "([^"]*)" to that array$/
+ */
+ public function iPushToThatArray($arg1)
+ {
+ array_push($this->array, $arg1);
+ }
+
+ /**
+ * @Then /^I should get "([^"]*)"$/
+ */
+ public function iShouldGet($arg1)
+ {
+ PHPUnit_Framework_Assert::assertEquals($arg1, $this->result);
+ }
+
+ }
+ """
+ And a file named "features/e_notice_in_scenario.feature" with:
+ """
+ Feature: E_NOTICE in scenario
+ In order to test the BEHAT_ERROR_REPORTING constant
+ As a contributor of behat
+ I need to have a FeatureContext that throws E_NOTICE within steps.
+
+ Background:
+ Given I have an empty array
+
+ Scenario: Access undefined index
+ When I access array index 0
+ Then I should get NULL
+
+ Scenario: Access defined index
+ When I push "foo" to that array
+ And I access array index 0
+ Then I should get "foo"
+
+ """
+
+ Scenario: With default error reporting
+ When I run "behat -f progress --no-colors"
+ Then it should fail
+ And the output should contain:
+ """
+ --- Failed steps:
+
+ When I access array index 0 # features/e_notice_in_scenario.feature:10
+ Notice: Undefined offset: 0 in features/bootstrap/FeatureContext.php line 24
+
+ 2 scenarios (1 passed, 1 failed)
+ 7 steps (5 passed, 1 failed, 1 skipped)
+ """
+
+ Scenario: With error reporting ignoring E_NOTICE
+ Given a file named "behat.yml" with:
+ """
+ default:
+ calls:
+ error_reporting: 32759
+ """
+ When I run "behat -f progress --no-colors"
+ Then it should pass
diff --git a/vendor/behat/behat/features/extensions.feature b/vendor/behat/behat/features/extensions.feature
new file mode 100644
index 0000000..247c87c
--- /dev/null
+++ b/vendor/behat/behat/features/extensions.feature
@@ -0,0 +1,124 @@
+Feature: Extensions
+ In order to provide additional functionality for Behat
+ As a developer
+ I need to be able to write simple extensions
+
+ Background:
+ Given a file named "behat.yml" with:
+ """
+ default:
+ extensions:
+ custom_extension.php:
+ param1: val1
+ param2: val2
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ extension = $parameters;
+ }
+
+ /** @When this scenario executes */
+ public function thisScenarioExecutes() {}
+
+ /** @Then the extension should be loaded */
+ public function theExtensionLoaded() {
+ PHPUnit_Framework_Assert::assertEquals(array('param1' => 'val1', 'param2' => 'val2'), $this->extension);
+ }
+ }
+ """
+ And a file named "custom_extension.php" with:
+ """
+ parameters = $parameters;
+ }
+
+ public function supportsContext(Behat\Behat\Context\Context $context)
+ {
+ return true;
+ }
+
+ public function initializeContext(Behat\Behat\Context\Context $context)
+ {
+ $context->setExtensionParameters($this->parameters);
+ }
+ }
+
+ class CustomExtension implements Behat\Testwork\ServiceContainer\Extension {
+ public function getConfigKey()
+ {
+ return 'custom_extension';
+ }
+
+ public function configure(ArrayNodeDefinition $builder)
+ {
+ $builder->useAttributeAsKey('name')->prototype('variable');
+ }
+
+ public function initialize(Behat\Testwork\ServiceContainer\ExtensionManager $extensionManager) {}
+
+ public function load(ContainerBuilder $container, array $config)
+ {
+ $definition = $container->register('custom_initializer', 'CustomInitializer', array($config));
+ $definition->setArguments(array($config));
+ $definition->addTag('context.initializer', array('priority' => 100));
+ }
+
+ public function process(ContainerBuilder $container) {}
+ }
+
+ return new CustomExtension;
+ """
+ And a file named "features/extensions.feature" with:
+ """
+ Feature:
+ Scenario:
+ When this scenario executes
+ Then the extension should be loaded
+ """
+
+ Scenario: Extension should be successfully loaded
+ When I run "behat -f progress --append-snippets"
+ Then it should pass
+
+ Scenario: Instantiating inexistent extension file
+ Given a file named "behat.yml" with:
+ """
+ default:
+ extensions:
+ inexistent_extension: ~
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ parameters = $parameters;
+ }
+
+ /**
+ * @Given /^I have (\d+) apples?$/
+ */
+ public function iHaveApples($count) {
+ $this->apples = intval($count);
+ }
+
+ /**
+ * @When /^I ate (\d+) apples?$/
+ */
+ public function iAteApples($count) {
+ $this->apples -= intval($count);
+ }
+
+ /**
+ * @When /^I found (\d+) apples?$/
+ */
+ public function iFoundApples($count) {
+ $this->apples += intval($count);
+ }
+
+ /**
+ * @Then /^I should have (\d+) apples$/
+ */
+ public function iShouldHaveApples($count) {
+ PHPUnit_Framework_Assert::assertEquals(intval($count), $this->apples);
+ }
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be equal to "([^"]*)"$/
+ */
+ public function contextParameterShouldBeEqualTo($key, $val) {
+ PHPUnit_Framework_Assert::assertEquals($val, $this->parameters[$key]);
+ }
+
+ /**
+ * @Given /^context parameter "([^"]*)" should be array with (\d+) elements$/
+ */
+ public function contextParameterShouldBeArrayWithElements($key, $count) {
+ PHPUnit_Framework_Assert::assertInternalType('array', $this->parameters[$key]);
+ PHPUnit_Framework_Assert::assertEquals(2, count($this->parameters[$key]));
+ }
+ }
+ """
+ And a file named "features/apples.feature" with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ Then I should have 3 apples
+
+ Scenario: Found more apples
+ When I found 5 apples
+ Then I should have 8 apples
+
+ Scenario: Found more apples
+ When I found 2 apples
+ Then I should have 5 apples
+ And do something undefined
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines
+ Given pystring:
+ '''
+ some pystring
+ '''
+ And table:
+ | col1 | col2 |
+ | val1 | val2 |
+ """
+
+ Scenario: --no-colors option
+ When I run "behat --no-colors"
+ Then it should fail with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background: # features/apples.feature:6
+ Given I have 3 apples # FeatureContext::iHaveApples()
+
+ Scenario: I'm little hungry # features/apples.feature:9
+ When I ate 1 apple # FeatureContext::iAteApples()
+ Then I should have 3 apples # FeatureContext::iShouldHaveApples()
+ Failed asserting that 2 matches expected 3.
+
+ Scenario: Found more apples # features/apples.feature:13
+ When I found 5 apples # FeatureContext::iFoundApples()
+ Then I should have 8 apples # FeatureContext::iShouldHaveApples()
+
+ Scenario: Found more apples # features/apples.feature:17
+ When I found 2 apples # FeatureContext::iFoundApples()
+ Then I should have 5 apples # FeatureContext::iShouldHaveApples()
+ And do something undefined
+
+ Scenario Outline: Other situations # features/apples.feature:22
+ When I ate apples # FeatureContext::iAteApples()
+ And I found apples # FeatureContext::iFoundApples()
+ Then I should have apples # FeatureContext::iShouldHaveApples()
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines # features/apples.feature:33
+ Given pystring:
+ '''
+ some pystring
+ '''
+ And table:
+ | col1 | col2 |
+ | val1 | val2 |
+
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: --no-paths option
+ When I run "behat --no-colors --format-settings='{\"paths\": false}'"
+ Then it should fail with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ Then I should have 3 apples
+ Failed asserting that 2 matches expected 3.
+
+ Scenario: Found more apples
+ When I found 5 apples
+ Then I should have 8 apples
+
+ Scenario: Found more apples
+ When I found 2 apples
+ Then I should have 5 apples
+ And do something undefined
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines
+ Given pystring:
+ '''
+ some pystring
+ '''
+ And table:
+ | col1 | col2 |
+ | val1 | val2 |
+
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: --no-snippets option
+ When I run "behat --no-colors --no-snippets"
+ Then it should fail with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background: # features/apples.feature:6
+ Given I have 3 apples # FeatureContext::iHaveApples()
+
+ Scenario: I'm little hungry # features/apples.feature:9
+ When I ate 1 apple # FeatureContext::iAteApples()
+ Then I should have 3 apples # FeatureContext::iShouldHaveApples()
+ Failed asserting that 2 matches expected 3.
+
+ Scenario: Found more apples # features/apples.feature:13
+ When I found 5 apples # FeatureContext::iFoundApples()
+ Then I should have 8 apples # FeatureContext::iShouldHaveApples()
+
+ Scenario: Found more apples # features/apples.feature:17
+ When I found 2 apples # FeatureContext::iFoundApples()
+ Then I should have 5 apples # FeatureContext::iShouldHaveApples()
+ And do something undefined
+
+ Scenario Outline: Other situations # features/apples.feature:22
+ When I ate apples # FeatureContext::iAteApples()
+ And I found apples # FeatureContext::iFoundApples()
+ Then I should have apples # FeatureContext::iShouldHaveApples()
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines # features/apples.feature:33
+ Given pystring:
+ '''
+ some pystring
+ '''
+ And table:
+ | col1 | col2 |
+ | val1 | val2 |
+
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+ """
+
+ Scenario: --expand option
+ When I run "behat --no-colors --format-settings='{\"expand\": true}'"
+ Then it should fail with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background: # features/apples.feature:6
+ Given I have 3 apples # FeatureContext::iHaveApples()
+
+ Scenario: I'm little hungry # features/apples.feature:9
+ When I ate 1 apple # FeatureContext::iAteApples()
+ Then I should have 3 apples # FeatureContext::iShouldHaveApples()
+ Failed asserting that 2 matches expected 3.
+
+ Scenario: Found more apples # features/apples.feature:13
+ When I found 5 apples # FeatureContext::iFoundApples()
+ Then I should have 8 apples # FeatureContext::iShouldHaveApples()
+
+ Scenario: Found more apples # features/apples.feature:17
+ When I found 2 apples # FeatureContext::iFoundApples()
+ Then I should have 5 apples # FeatureContext::iShouldHaveApples()
+ And do something undefined
+
+ Scenario Outline: Other situations # features/apples.feature:22
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 | # features/apples.feature:29
+ When I ate 3 apples # FeatureContext::iAteApples()
+ And I found 1 apples # FeatureContext::iFoundApples()
+ Then I should have 1 apples # FeatureContext::iShouldHaveApples()
+ | 0 | 4 | 8 | # features/apples.feature:30
+ When I ate 0 apples # FeatureContext::iAteApples()
+ And I found 4 apples # FeatureContext::iFoundApples()
+ Then I should have 8 apples # FeatureContext::iShouldHaveApples()
+ Failed asserting that 7 matches expected 8.
+ | 2 | 2 | 3 | # features/apples.feature:31
+ When I ate 2 apples # FeatureContext::iAteApples()
+ And I found 2 apples # FeatureContext::iFoundApples()
+ Then I should have 3 apples # FeatureContext::iShouldHaveApples()
+
+ Scenario: Multilines # features/apples.feature:33
+ Given pystring:
+ '''
+ some pystring
+ '''
+ And table:
+ | col1 | col2 |
+ | val1 | val2 |
+
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: --no-multiline option
+ When I run "behat --no-colors --format-settings='{\"multiline\": false}'"
+ Then it should fail with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background: # features/apples.feature:6
+ Given I have 3 apples # FeatureContext::iHaveApples()
+
+ Scenario: I'm little hungry # features/apples.feature:9
+ When I ate 1 apple # FeatureContext::iAteApples()
+ Then I should have 3 apples # FeatureContext::iShouldHaveApples()
+ Failed asserting that 2 matches expected 3.
+
+ Scenario: Found more apples # features/apples.feature:13
+ When I found 5 apples # FeatureContext::iFoundApples()
+ Then I should have 8 apples # FeatureContext::iShouldHaveApples()
+
+ Scenario: Found more apples # features/apples.feature:17
+ When I found 2 apples # FeatureContext::iFoundApples()
+ Then I should have 5 apples # FeatureContext::iShouldHaveApples()
+ And do something undefined
+
+ Scenario Outline: Other situations # features/apples.feature:22
+ When I ate apples # FeatureContext::iAteApples()
+ And I found apples # FeatureContext::iFoundApples()
+ Then I should have apples # FeatureContext::iShouldHaveApples()
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines # features/apples.feature:33
+ Given pystring:
+ ...
+ And table:
+ ...
+
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
diff --git a/vendor/behat/behat/features/hooks.feature b/vendor/behat/behat/features/hooks.feature
new file mode 100644
index 0000000..557969e
--- /dev/null
+++ b/vendor/behat/behat/features/hooks.feature
@@ -0,0 +1,516 @@
+Feature: hooks
+ In order to hook into Behat testing process
+ As a tester
+ I need to be able to write hooks
+
+ Background:
+ Given a file named "behat.yml" with:
+ """
+ default:
+ suites:
+ default:
+ parameters:
+ before_feature: BEFORE EVERY FEATURE
+ after_feature: AFTER EVERY FEATURE
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ getSuite()->getSetting('parameters');
+ echo "= do something ".$params['before_feature'];
+ }
+
+ /**
+ * @AfterFeature
+ */
+ static public function doSomethingAfterFeature($event) {
+ $params = $event->getSuite()->getSetting('parameters');
+ echo "= do something ".$params['after_feature'];
+ }
+
+ /**
+ * @BeforeFeature @someFeature
+ */
+ static public function doSomethingBeforeSomeFeature($event) {
+ echo "= do something before SOME feature";
+ }
+
+ /**
+ * @AfterFeature @someFeature
+ */
+ static public function doSomethingAfterSomeFeature($event) {
+ echo "= do something after SOME feature";
+ }
+
+ /**
+ * @BeforeScenario
+ */
+ public function beforeScenario($event) {
+ $this->number = 50;
+ }
+
+ /**
+ * @BeforeScenario 130
+ */
+ public function beforeScenario130($event) {
+ $this->number = 130;
+ }
+
+ /**
+ * @BeforeScenario @thirty
+ */
+ public function beforeScenarioThirty($event) {
+ $this->number = 30;
+ }
+
+ /**
+ * @BeforeScenario @exception
+ */
+ public function beforeScenarioException($event) {
+ throw new \Exception('Exception');
+ }
+
+ /**
+ * @BeforeStep I must have 100
+ */
+ public function beforeStep100($event) {
+ $this->number = 100;
+ }
+
+ /**
+ * @Given /^I have entered (\d+)$/
+ */
+ public function iHaveEntered($number) {
+ $this->number = intval($number);
+ }
+
+ /**
+ * @Then /^I must have (\d+)$/
+ */
+ public function iMustHave($number) {
+ \PHPUnit_Framework_Assert::assertEquals(intval($number), $this->number);
+ }
+ }
+ """
+
+ Scenario:
+ Given a file named "features/test.feature" with:
+ """
+ Feature:
+ Scenario:
+ Then I must have 50
+ Scenario:
+ Given I have entered 12
+ Then I must have 12
+
+ @thirty
+ Scenario:
+ Given I must have 30
+ When I have entered 23
+ Then I must have 23
+ @100 @thirty
+ Scenario:
+ Given I must have 30
+ When I have entered 1
+ Then I must have 100
+
+ Scenario: 130
+ Given I must have 130
+ """
+ When I run "behat --no-colors -f pretty"
+ Then it should pass with:
+ """
+ ┌─ @BeforeFeature # FeatureContext::doSomethingBeforeFeature()
+ │
+ │ = do something BEFORE EVERY FEATURE
+ │
+ Feature:
+
+ Scenario: # features/test.feature:2
+ Then I must have 50 # FeatureContext::iMustHave()
+
+ Scenario: # features/test.feature:4
+ Given I have entered 12 # FeatureContext::iHaveEntered()
+ Then I must have 12 # FeatureContext::iMustHave()
+
+ @thirty
+ Scenario: # features/test.feature:9
+ Given I must have 30 # FeatureContext::iMustHave()
+ When I have entered 23 # FeatureContext::iHaveEntered()
+ Then I must have 23 # FeatureContext::iMustHave()
+
+ @100 @thirty
+ Scenario: # features/test.feature:14
+ Given I must have 30 # FeatureContext::iMustHave()
+ When I have entered 1 # FeatureContext::iHaveEntered()
+ Then I must have 100 # FeatureContext::iMustHave()
+
+ Scenario: 130 # features/test.feature:19
+ Given I must have 130 # FeatureContext::iMustHave()
+
+ │
+ │ = do something AFTER EVERY FEATURE
+ │
+ └─ @AfterFeature # FeatureContext::doSomethingAfterFeature()
+
+ 5 scenarios (5 passed)
+ 10 steps (10 passed)
+ """
+
+ Scenario: Filter features
+ Given a file named "features/1-one.feature" with:
+ """
+ Feature:
+ Scenario:
+ Then I must have 50
+
+ Scenario:
+ Given I have entered 12
+ Then I must have 12
+
+ Scenario: 130
+ Given I must have 130
+ """
+ Given a file named "features/2-two.feature" with:
+ """
+ @someFeature
+ Feature:
+ Scenario: 130
+ Given I must have 130
+ """
+ When I run "behat --no-colors -f pretty"
+ Then it should pass with:
+ """
+ ┌─ @BeforeFeature # FeatureContext::doSomethingBeforeFeature()
+ │
+ │ = do something BEFORE EVERY FEATURE
+ │
+ Feature:
+
+ Scenario: # features/1-one.feature:2
+ Then I must have 50 # FeatureContext::iMustHave()
+
+ Scenario: # features/1-one.feature:5
+ Given I have entered 12 # FeatureContext::iHaveEntered()
+ Then I must have 12 # FeatureContext::iMustHave()
+
+ Scenario: 130 # features/1-one.feature:9
+ Given I must have 130 # FeatureContext::iMustHave()
+
+ │
+ │ = do something AFTER EVERY FEATURE
+ │
+ └─ @AfterFeature # FeatureContext::doSomethingAfterFeature()
+
+ ┌─ @BeforeFeature # FeatureContext::doSomethingBeforeFeature()
+ │
+ │ = do something BEFORE EVERY FEATURE
+ │
+ ┌─ @BeforeFeature @someFeature # FeatureContext::doSomethingBeforeSomeFeature()
+ │
+ │ = do something before SOME feature
+ │
+ @someFeature
+ Feature:
+
+ Scenario: 130 # features/2-two.feature:3
+ Given I must have 130 # FeatureContext::iMustHave()
+
+ │
+ │ = do something AFTER EVERY FEATURE
+ │
+ └─ @AfterFeature # FeatureContext::doSomethingAfterFeature()
+
+ │
+ │ = do something after SOME feature
+ │
+ └─ @AfterFeature @someFeature # FeatureContext::doSomethingAfterSomeFeature()
+
+ 4 scenarios (4 passed)
+ 5 steps (5 passed)
+ """
+
+ Scenario: Background step hooks
+ Given a file named "features/background.feature" with:
+ """
+ Feature:
+ Background:
+ Given I must have 50
+
+ Scenario:
+ Given I have entered 12
+ Then I must have 12
+ """
+ When I run "behat --no-colors -f pretty"
+ Then it should pass with:
+ """
+ ┌─ @BeforeFeature # FeatureContext::doSomethingBeforeFeature()
+ │
+ │ = do something BEFORE EVERY FEATURE
+ │
+ Feature:
+
+ Background: # features/background.feature:2
+ Given I must have 50 # FeatureContext::iMustHave()
+
+ Scenario: # features/background.feature:5
+ Given I have entered 12 # FeatureContext::iHaveEntered()
+ Then I must have 12 # FeatureContext::iMustHave()
+
+ │
+ │ = do something AFTER EVERY FEATURE
+ │
+ └─ @AfterFeature # FeatureContext::doSomethingAfterFeature()
+
+ 1 scenario (1 passed)
+ 3 steps (3 passed)
+ """
+
+ Scenario: Background exceptions
+ Given a file named "features/background.feature" with:
+ """
+ Feature:
+
+ @exception
+ Scenario:
+ Then I must have 50
+ Scenario:
+ Given I have entered 12
+ Then I must have 12
+
+ @exception
+ Scenario:
+ Given I must have 30
+ When I have entered 23
+ Then I must have 23
+
+ Scenario: 130
+ Given I must have 130
+ """
+ When I run "behat --no-colors -f pretty"
+ Then it should fail with:
+ """
+ ┌─ @BeforeFeature # FeatureContext::doSomethingBeforeFeature()
+ │
+ │ = do something BEFORE EVERY FEATURE
+ │
+ Feature:
+
+ ┌─ @BeforeScenario @exception # FeatureContext::beforeScenarioException()
+ │
+ ╳ Exception (Exception)
+ │
+ @exception
+ Scenario: # features/background.feature:4
+ Then I must have 50 # FeatureContext::iMustHave()
+
+ Scenario: # features/background.feature:6
+ Given I have entered 12 # FeatureContext::iHaveEntered()
+ Then I must have 12 # FeatureContext::iMustHave()
+
+ ┌─ @BeforeScenario @exception # FeatureContext::beforeScenarioException()
+ │
+ ╳ Exception (Exception)
+ │
+ @exception
+ Scenario: # features/background.feature:11
+ Given I must have 30 # FeatureContext::iMustHave()
+ When I have entered 23 # FeatureContext::iHaveEntered()
+ Then I must have 23 # FeatureContext::iMustHave()
+
+ Scenario: 130 # features/background.feature:16
+ Given I must have 130 # FeatureContext::iMustHave()
+
+ │
+ │ = do something AFTER EVERY FEATURE
+ │
+ └─ @AfterFeature # FeatureContext::doSomethingAfterFeature()
+
+ --- Skipped scenarios:
+
+ features/background.feature:4
+ features/background.feature:11
+
+ 4 scenarios (2 passed, 2 skipped)
+ 7 steps (3 passed, 4 skipped)
+ """
+
+ Scenario: Step state doesn't affect after hooks
+ Given a file named "features/test.feature" with:
+ """
+ Feature:
+
+ Scenario:
+ Given passing step
+
+ Scenario:
+ Given failing step
+
+ Scenario:
+ Given passing step with failing hook
+
+ @failing-before-hook
+ Scenario:
+ Given passing step
+ """
+ And a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ value = intval($number);
+ }
+
+ /**
+ * @Then /Я должен иметь (\d+)/
+ */
+ public function iShouldHave($number) {
+ PHPUnit_Framework_Assert::assertEquals(intval($number), $this->value);
+ }
+
+ /**
+ * @When /Я добавлю (\d+)/
+ */
+ public function iAdd($number) {
+ $this->value += intval($number);
+ }
+
+ /**
+ * @When /^Что-то еще не сделано$/
+ */
+ public function somethingNotDone() {
+ throw new PendingException();
+ }
+ }
+ """
+ And a file named "features/World.feature" with:
+ """
+ # language: ru
+ Функционал: Постоянство мира
+ Чтобы поддерживать стабильными тесты
+ Как разработчик функционала
+ Я хочу чтобы Мир сбрасывался между сценариями
+
+ Предыстория:
+ Если Я ввел 10
+
+ Сценарий: Неопределен
+ То Я должен иметь 10
+ И Добавить "нормальное" число
+ То Я должен иметь 10
+
+ Сценарий: В ожидании
+ То Я должен иметь 10
+ И Что-то еще не сделано
+ То Я должен иметь 10
+
+ Сценарий: Провален
+ Если Я добавлю 4
+ То Я должен иметь 13
+
+ Структура сценария: Пройдено и Провалено
+ Допустим Я должен иметь 10
+ Если Я добавлю <значение>
+ То Я должен иметь <результат>
+
+ Примеры:
+ | значение | результат |
+ | 5 | 16 |
+ | 10 | 20 |
+ | 23 | 32 |
+ """
+
+ Scenario: Pretty
+ When I run "behat --no-colors -f pretty --lang=ru"
+ Then it should fail with:
+ """
+ Функционал: Постоянство мира
+ Чтобы поддерживать стабильными тесты
+ Как разработчик функционала
+ Я хочу чтобы Мир сбрасывался между сценариями
+
+ Предыстория: # features/World.feature:7
+ Если Я ввел 10 # FeatureContext::iHaveEntered()
+
+ Сценарий: Неопределен # features/World.feature:10
+ То Я должен иметь 10 # FeatureContext::iShouldHave()
+ И Добавить "нормальное" число
+ То Я должен иметь 10 # FeatureContext::iShouldHave()
+
+ Сценарий: В ожидании # features/World.feature:15
+ То Я должен иметь 10 # FeatureContext::iShouldHave()
+ И Что-то еще не сделано # FeatureContext::somethingNotDone()
+ TODO: write pending definition
+ То Я должен иметь 10 # FeatureContext::iShouldHave()
+
+ Сценарий: Провален # features/World.feature:20
+ Если Я добавлю 4 # FeatureContext::iAdd()
+ То Я должен иметь 13 # FeatureContext::iShouldHave()
+ Failed asserting that 14 matches expected 13.
+
+ Структура сценария: Пройдено и Провалено # features/World.feature:24
+ Допустим Я должен иметь 10 # FeatureContext::iShouldHave()
+ Если Я добавлю <значение> # FeatureContext::iAdd()
+ То Я должен иметь <результат> # FeatureContext::iShouldHave()
+
+ Примеры:
+ | значение | результат |
+ | 5 | 16 |
+ Failed asserting that 15 matches expected 16.
+ | 10 | 20 |
+ | 23 | 32 |
+ Failed asserting that 33 matches expected 32.
+
+ --- Проваленные сценарии:
+
+ features/World.feature:20
+ features/World.feature:31
+ features/World.feature:33
+
+ 6 сценариев (1 пройден, 3 провалено, 1 не определен, 1 в ожидании)
+ 23 шага (16 пройдено, 3 провалено, 1 не определен, 1 в ожидании, 2 пропущено)
+
+ --- FeatureContext не содержит необходимых определений. Вы можете добавить их используя шаблоны:
+
+ /**
+ * @Then /^Добавить "([^"]*)" число$/
+ */
+ public function dobavitChislo($arg1)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: Progress
+ When I run "behat --no-colors -f progress --lang=ru"
+ Then it should fail with:
+ """
+ ..U-..P-..F...F.......F
+
+ --- Проваленные шаги:
+
+ То Я должен иметь 13 # features/World.feature:22
+ Failed asserting that 14 matches expected 13.
+
+ То Я должен иметь 16 # features/World.feature:27
+ Failed asserting that 15 matches expected 16.
+
+ То Я должен иметь 32 # features/World.feature:27
+ Failed asserting that 33 matches expected 32.
+
+ --- Шаги в ожидании:
+
+ И Что-то еще не сделано # FeatureContext::somethingNotDone()
+ TODO: write pending definition
+
+ 6 сценариев (1 пройден, 3 провалено, 1 не определен, 1 в ожидании)
+ 23 шага (16 пройдено, 3 провалено, 1 не определен, 1 в ожидании, 2 пропущено)
+
+ --- FeatureContext не содержит необходимых определений. Вы можете добавить их используя шаблоны:
+
+ /**
+ * @Then /^Добавить "([^"]*)" число$/
+ */
+ public function dobavitChislo($arg1)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: Progress with unexisting locale
+ When I run "behat --no-colors -f progress --lang=xx"
+ Then it should fail with:
+ """
+ ..U-..P-..F...F.......F
+
+ --- Failed steps:
+
+ То Я должен иметь 13 # features/World.feature:22
+ Failed asserting that 14 matches expected 13.
+
+ То Я должен иметь 16 # features/World.feature:27
+ Failed asserting that 15 matches expected 16.
+
+ То Я должен иметь 32 # features/World.feature:27
+ Failed asserting that 33 matches expected 32.
+
+ --- Pending steps:
+
+ И Что-то еще не сделано # FeatureContext::somethingNotDone()
+ TODO: write pending definition
+
+ 6 scenarios (1 passed, 3 failed, 1 undefined, 1 pending)
+ 23 steps (16 passed, 3 failed, 1 undefined, 1 pending, 2 skipped)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^Добавить "([^"]*)" число$/
+ */
+ public function dobavitChislo($arg1)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: Progress with unexisting locale
+ When I run "behat --no-colors -f progress --lang=xx"
+ Then it should fail with:
+ """
+ ..U-..P-..F...F.......F
+
+ --- Failed steps:
+
+ То Я должен иметь 13 # features/World.feature:22
+ Failed asserting that 14 matches expected 13.
+
+ То Я должен иметь 16 # features/World.feature:27
+ Failed asserting that 15 matches expected 16.
+
+ То Я должен иметь 32 # features/World.feature:27
+ Failed asserting that 33 matches expected 32.
+
+ --- Pending steps:
+
+ И Что-то еще не сделано # FeatureContext::somethingNotDone()
+ TODO: write pending definition
+
+ 6 scenarios (1 passed, 3 failed, 1 undefined, 1 pending)
+ 23 steps (16 passed, 3 failed, 1 undefined, 1 pending, 2 skipped)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^Добавить "([^"]*)" число$/
+ */
+ public function dobavitChislo($arg1)
+ {
+ throw new PendingException();
+ }
+ """
diff --git a/vendor/behat/behat/features/init.feature b/vendor/behat/behat/features/init.feature
new file mode 100644
index 0000000..2023780
--- /dev/null
+++ b/vendor/behat/behat/features/init.feature
@@ -0,0 +1,82 @@
+Feature: Init
+ In order to be able to start fast
+ As a feature developer
+ I need to be able to init Behat path structure fast
+
+ Scenario: Simple init
+ Given I am in the "init_test" path
+ When I run "behat --no-colors --init"
+ Then it should pass with:
+ """
+ +d features - place your *.feature files here
+ +d features/bootstrap - place your context classes here
+ +f features/bootstrap/FeatureContext.php - place your definitions, transformations and hooks here
+ """
+ And file "features/bootstrap/FeatureContext.php" should exist
+
+ Scenario: Custom paths
+ Given I am in the "init_test2" path
+ And a file named "behat.yml" with:
+ """
+ default:
+ autoload: %paths.base%/supp
+ suites:
+ default:
+ paths: [ %paths.base%/scenarios ]
+ contexts: [ CustomContext ]
+ """
+ When I run "behat --no-colors --init"
+ Then it should pass with:
+ """
+ +d scenarios - place your *.feature files here
+ +d supp - place your context classes here
+ +f supp/CustomContext.php - place your definitions, transformations and hooks here
+ """
+ And file "supp/CustomContext.php" should exist
+
+ Scenario: Multiple suites
+ Given I am in the "init_test3" path
+ And a file named "behat.yml" with:
+ """
+ default:
+ autoload: %paths.base%/contexts
+ suites:
+ suite1:
+ paths: [ %paths.base%/scenarios1 ]
+ contexts: [ Custom1Context ]
+ suite2:
+ paths: [ %paths.base%/scenarios2 ]
+ contexts: [ Custom2Context ]
+ """
+ When I run "behat --no-colors --init"
+ Then it should pass with:
+ """
+ +d scenarios1 - place your *.feature files here
+ +d contexts - place your context classes here
+ +f contexts/Custom1Context.php - place your definitions, transformations and hooks here
+ +d scenarios2 - place your *.feature files here
+ +f contexts/Custom2Context.php - place your definitions, transformations and hooks here
+ """
+ And file "contexts/Custom1Context.php" should exist
+ And file "contexts/Custom2Context.php" should exist
+
+ Scenario: Contexts with arguments
+ Given I am in the "init_test2" path
+ And a file named "behat.yml" with:
+ """
+ default:
+ autoload: %paths.base%/supp
+ suites:
+ default:
+ paths: [ %paths.base%/scenarios ]
+ contexts:
+ - CustomContext: [ 'a', 'b' ]
+ """
+ When I run "behat --no-colors --init"
+ Then it should pass with:
+ """
+ +d scenarios - place your *.feature files here
+ +d supp - place your context classes here
+ +f supp/CustomContext.php - place your definitions, transformations and hooks here
+ """
+ And file "supp/CustomContext.php" should exist
diff --git a/vendor/behat/behat/features/locale_configuration.feature b/vendor/behat/behat/features/locale_configuration.feature
new file mode 100644
index 0000000..ad02924
--- /dev/null
+++ b/vendor/behat/behat/features/locale_configuration.feature
@@ -0,0 +1,48 @@
+Feature: Locale configuration
+ In order to display feature in custom language
+ As a feature writer
+ I need to be able to the locale inside the configuration file
+
+ Background:
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ parameters = $parameters;
+ }
+
+ /**
+ * @Given /^I have (\d+) apples?$/
+ */
+ public function iHaveApples($count) {
+ $this->apples = intval($count);
+ }
+
+ /**
+ * @When /^I ate (\d+) apples?$/
+ */
+ public function iAteApples($count) {
+ $this->apples -= intval($count);
+ }
+
+ /**
+ * @When /^I found (\d+) apples?$/
+ */
+ public function iFoundApples($count) {
+ $this->apples += intval($count);
+ }
+
+ /**
+ * @Then /^I should have (\d+) apples$/
+ */
+ public function iShouldHaveApples($count) {
+ PHPUnit_Framework_Assert::assertEquals(intval($count), $this->apples);
+ }
+
+ /**
+ * @Then /^context parameter "([^"]*)" should be equal to "([^"]*)"$/
+ */
+ public function contextParameterShouldBeEqualTo($key, $val) {
+ PHPUnit_Framework_Assert::assertEquals($val, $this->parameters[$key]);
+ }
+
+ /**
+ * @Given /^context parameter "([^"]*)" should be array with (\d+) elements$/
+ */
+ public function contextParameterShouldBeArrayWithElements($key, $count) {
+ PHPUnit_Framework_Assert::assertInternalType('array', $this->parameters[$key]);
+ PHPUnit_Framework_Assert::assertEquals(2, count($this->parameters[$key]));
+ }
+ }
+ """
+ And a file named "features/apples.feature" with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ Then I should have 3 apples
+
+ Scenario: Found more apples
+ When I found 5 apples
+ Then I should have 8 apples
+
+ Scenario: Found more apples
+ When I found 2 apples
+ Then I should have 5 apples
+ And do something undefined
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines
+ Given pystring:
+ '''
+ some pystring
+ '''
+ And table:
+ | col1 | col2 |
+ | val1 | val2 |
+ """
+
+ Scenario: 2 formats, default output
+ When I run "behat --no-colors -f pretty -f progress --format-settings='{\"multiline\": false}'"
+ Then it should fail with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background: # features/apples.feature:6
+ Given I have 3 apples # FeatureContext::iHaveApples()
+ .
+ Scenario: I'm little hungry # features/apples.feature:9
+ When I ate 1 apple # FeatureContext::iAteApples()
+ . Then I should have 3 apples # FeatureContext::iShouldHaveApples()
+ Failed asserting that 2 matches expected 3.
+ F
+ Scenario: Found more apples # features/apples.feature:13
+ . When I found 5 apples # FeatureContext::iFoundApples()
+ . Then I should have 8 apples # FeatureContext::iShouldHaveApples()
+ .
+ Scenario: Found more apples # features/apples.feature:17
+ . When I found 2 apples # FeatureContext::iFoundApples()
+ . Then I should have 5 apples # FeatureContext::iShouldHaveApples()
+ . And do something undefined
+ U
+ .... Scenario Outline: Other situations # features/apples.feature:22
+ When I ate apples # FeatureContext::iAteApples()
+ And I found apples # FeatureContext::iFoundApples()
+ Then I should have apples # FeatureContext::iShouldHaveApples()
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ ...F | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ .... | 2 | 2 | 3 |
+
+ Scenario: Multilines # features/apples.feature:33
+ . Given pystring:
+ ...
+ U And table:
+ ...
+ U
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+
+ --- Failed steps:
+
+ Then I should have 3 apples # features/apples.feature:11
+ Failed asserting that 2 matches expected 3.
+
+ Then I should have 8 apples # features/apples.feature:25
+ Failed asserting that 7 matches expected 8.
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: 2 formats, same output
+ When I run "behat --no-colors -f pretty -f progress --out=std --format-settings='{\"multiline\": false}'"
+ Then it should fail with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background: # features/apples.feature:6
+ Given I have 3 apples # FeatureContext::iHaveApples()
+ .
+ Scenario: I'm little hungry # features/apples.feature:9
+ When I ate 1 apple # FeatureContext::iAteApples()
+ . Then I should have 3 apples # FeatureContext::iShouldHaveApples()
+ Failed asserting that 2 matches expected 3.
+ F
+ Scenario: Found more apples # features/apples.feature:13
+ . When I found 5 apples # FeatureContext::iFoundApples()
+ . Then I should have 8 apples # FeatureContext::iShouldHaveApples()
+ .
+ Scenario: Found more apples # features/apples.feature:17
+ . When I found 2 apples # FeatureContext::iFoundApples()
+ . Then I should have 5 apples # FeatureContext::iShouldHaveApples()
+ . And do something undefined
+ U
+ .... Scenario Outline: Other situations # features/apples.feature:22
+ When I ate apples # FeatureContext::iAteApples()
+ And I found apples # FeatureContext::iFoundApples()
+ Then I should have apples # FeatureContext::iShouldHaveApples()
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ ...F | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ .... | 2 | 2 | 3 |
+
+ Scenario: Multilines # features/apples.feature:33
+ . Given pystring:
+ ...
+ U And table:
+ ...
+ U
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+
+ --- Failed steps:
+
+ Then I should have 3 apples # features/apples.feature:11
+ Failed asserting that 2 matches expected 3.
+
+ Then I should have 8 apples # features/apples.feature:25
+ Failed asserting that 7 matches expected 8.
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: 2 formats, write first to file
+ When I run "behat --no-colors -f pretty -o apples.pretty -f progress -o std --format-settings='{\"multiline\": false, \"paths\": false}'"
+ Then it should fail with:
+ """
+ ..F......U.......F.....UU
+
+ --- Failed steps:
+
+ Then I should have 3 apples # features/apples.feature:11
+ Failed asserting that 2 matches expected 3.
+
+ Then I should have 8 apples # features/apples.feature:25
+ Failed asserting that 7 matches expected 8.
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
+ And "apples.pretty" file should contain:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ Then I should have 3 apples
+ Failed asserting that 2 matches expected 3.
+
+ Scenario: Found more apples
+ When I found 5 apples
+ Then I should have 8 apples
+
+ Scenario: Found more apples
+ When I found 2 apples
+ Then I should have 5 apples
+ And do something undefined
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines
+ Given pystring:
+ ...
+ And table:
+ ...
+
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+ """
+
+ Scenario: 2 formats, write second to file
+ When I run "behat --no-colors -f pretty -o std --format=progress --out=apples.progress --format-settings='{\"multiline\": false, \"paths\": false}'"
+ Then it should fail with:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ Then I should have 3 apples
+ Failed asserting that 2 matches expected 3.
+
+ Scenario: Found more apples
+ When I found 5 apples
+ Then I should have 8 apples
+
+ Scenario: Found more apples
+ When I found 2 apples
+ Then I should have 5 apples
+ And do something undefined
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines
+ Given pystring:
+ ...
+ And table:
+ ...
+
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
+ And "apples.progress" file should contain:
+ """
+ ..F......U.......F.....UU
+
+ --- Failed steps:
+
+ Then I should have 3 apples # features/apples.feature:11
+ Failed asserting that 2 matches expected 3.
+
+ Then I should have 8 apples # features/apples.feature:25
+ Failed asserting that 7 matches expected 8.
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+ """
+
+ Scenario: 2 formats, write both to files
+ When I run "behat --no-colors -f pretty -o app.pretty -f progress -o app.progress --format-settings='{\"multiline\": false, \"paths\": false}'"
+ Then it should fail with:
+ """
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^do something undefined$/
+ */
+ public function doSomethingUndefined()
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^pystring:$/
+ */
+ public function pystring(PyStringNode $string)
+ {
+ throw new PendingException();
+ }
+
+ /**
+ * @Given /^table:$/
+ */
+ public function table(TableNode $table)
+ {
+ throw new PendingException();
+ }
+ """
+ And "app.pretty" file should contain:
+ """
+ Feature: Apples story
+ In order to eat apple
+ As a little kid
+ I need to have an apple in my pocket
+
+ Background:
+ Given I have 3 apples
+
+ Scenario: I'm little hungry
+ When I ate 1 apple
+ Then I should have 3 apples
+ Failed asserting that 2 matches expected 3.
+
+ Scenario: Found more apples
+ When I found 5 apples
+ Then I should have 8 apples
+
+ Scenario: Found more apples
+ When I found 2 apples
+ Then I should have 5 apples
+ And do something undefined
+
+ Scenario Outline: Other situations
+ When I ate apples
+ And I found apples
+ Then I should have apples
+
+ Examples:
+ | ate | found | result |
+ | 3 | 1 | 1 |
+ | 0 | 4 | 8 |
+ Failed asserting that 7 matches expected 8.
+ | 2 | 2 | 3 |
+
+ Scenario: Multilines
+ Given pystring:
+ ...
+ And table:
+ ...
+
+ --- Failed scenarios:
+
+ features/apples.feature:9
+ features/apples.feature:30
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+ """
+ And "app.progress" file should contain:
+ """
+ ..F......U.......F.....UU
+
+ --- Failed steps:
+
+ Then I should have 3 apples # features/apples.feature:11
+ Failed asserting that 2 matches expected 3.
+
+ Then I should have 8 apples # features/apples.feature:25
+ Failed asserting that 7 matches expected 8.
+
+ 7 scenarios (3 passed, 2 failed, 2 undefined)
+ 25 steps (20 passed, 2 failed, 3 undefined)
+ """
diff --git a/vendor/behat/behat/features/name_filters.feature b/vendor/behat/behat/features/name_filters.feature
new file mode 100644
index 0000000..5195375
--- /dev/null
+++ b/vendor/behat/behat/features/name_filters.feature
@@ -0,0 +1,118 @@
+Feature: Name filters
+ In order to run only needed features
+ As a Behat user
+ I need to Behat support features & scenario/outline names filtering
+
+ Background:
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ result = 0;
+ $this->numbers = array();
+ }
+
+ /**
+ * @Given /^I have entered (\d+)$/
+ */
+ public function iHaveEntered($number) {
+ $this->numbers[] = intval($number);
+ }
+
+ /**
+ * @When /^I add$/
+ */
+ public function iAdd() {
+ foreach ($this->numbers as $number) {
+ $this->result += $number;
+ }
+ $this->numbers = array();
+ }
+
+ /**
+ * @When /^I sub$/
+ */
+ public function iSub() {
+ $this->result = array_shift($this->numbers);
+ foreach ($this->numbers as $number) {
+ $this->result -= $number;
+ }
+ $this->numbers = array();
+ }
+
+ /**
+ * @When /^I multiply$/
+ */
+ public function iMultiply() {
+ $this->result = array_shift($this->numbers);
+ foreach ($this->numbers as $number) {
+ $this->result *= $number;
+ }
+ $this->numbers = array();
+ }
+
+ /**
+ * @When /^I div$/
+ */
+ public function iDiv() {
+ $this->result = array_shift($this->numbers);
+ foreach ($this->numbers as $number) {
+ $this->result /= $number;
+ }
+ $this->numbers = array();
+ }
+
+ /**
+ * @Then /^The result should be (\d+)$/
+ */
+ public function theResultShouldBe($result) {
+ PHPUnit_Framework_Assert::assertEquals(intval($result), $this->result);
+ }
+ }
+ """
+
+ Scenario: Basic scenario outline
+ Given a file named "features/math.feature" with:
+ """
+ Feature: Math
+ Background:
+ Given I have basic calculator
+
+ Scenario Outline:
+ Given I have entered
+ And I have entered
+ When I add
+ Then The result should be
+
+ Examples:
+ | number1 | number2 | result |
+ | 10 | 12 | 22 |
+ | 5 | 3 | 8 |
+ | 5 | 5 | 10 |
+ """
+ When I run "behat --no-colors -f progress features/math.feature"
+ Then it should pass with:
+ """
+ ...............
+
+ 3 scenarios (3 passed)
+ 15 steps (15 passed)
+ """
+
+ Scenario: Multiple scenario outlines
+ Given a file named "features/math.feature" with:
+ """
+ Feature: Math
+ Background:
+ Given I have basic calculator
+
+ Scenario Outline:
+ Given I have entered
+ And I have entered
+ When I multiply
+ Then The result should be
+
+ Examples:
+ | number1 | number2 | result |
+ | 10 | 12 | 120 |
+ | 5 | 3 | 15 |
+
+ Scenario:
+ Given I have entered 10
+ And I have entered 3
+ When I sub
+ Then The result should be 7
+
+ Scenario Outline:
+ Given I have entered
+ And I have entered
+ When I div
+ Then The result should be
+
+ Examples:
+ | number1 | number2 | result |
+ | 10 | 2 | 5 |
+ | 50 | 5 | 10 |
+ """
+ When I run "behat --no-colors -f progress features/math.feature"
+ Then it should pass with:
+ """
+ .........................
+
+ 5 scenarios (5 passed)
+ 25 steps (25 passed)
+ """
+
+ Scenario: Multiple scenario outlines with failing steps
+ Given a file named "features/math.feature" with:
+ """
+ Feature: Math
+ Background:
+ Given I have basic calculator
+
+ Scenario Outline:
+ Given I have entered
+ And I have entered
+ When I multiply
+ Then The result should be
+
+ Examples:
+ | number1 | number2 | result |
+ | 10 | 12 | 120 |
+ | 5 | 4 | 15 |
+
+ Scenario:
+ Given I have entered 10
+ And I have entered 4
+ When I sub
+ Then The result should be 7
+
+ Scenario Outline:
+ Given I have entered
+ And I have entered
+ When I div
+ Then The result should be
+
+ Examples:
+ | number1 | number2 | result |
+ | 10 | 2 | 5 |
+ | 50 | 10 | 2 |
+ | 50 | 10 | 4 |
+ """
+ When I run "behat --no-colors -f progress features/math.feature"
+ Then it should fail with:
+ """
+ .........F....F.........F....F
+
+ --- Failed steps:
+
+ Then The result should be 15 # features/math.feature:9
+ Failed asserting that 20 matches expected 15.
+
+ Then The result should be 7 # features/math.feature:20
+ Failed asserting that 6 matches expected 7.
+
+ Then The result should be 2 # features/math.feature:26
+ Failed asserting that 5 matches expected 2.
+
+ Then The result should be 4 # features/math.feature:26
+ Failed asserting that 5 matches expected 4.
+
+ 6 scenarios (2 passed, 4 failed)
+ 30 steps (26 passed, 4 failed)
+ """
diff --git a/vendor/behat/behat/features/parameters.feature b/vendor/behat/behat/features/parameters.feature
new file mode 100644
index 0000000..601054c
--- /dev/null
+++ b/vendor/behat/behat/features/parameters.feature
@@ -0,0 +1,161 @@
+Feature: Parameters
+ In order to support different setups
+ As a tester
+ I need to be able to configure Behat through environment variable
+
+ Background:
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ result = 0;
+ $this->numbers = array();
+ }
+
+ /**
+ * @Given /I have entered (\d+)/
+ */
+ public function iHaveEntered($number) {
+ $this->numbers[] = intval($number);
+ }
+
+ /**
+ * @When /I add/
+ */
+ public function iAdd() {
+ $this->result = array_sum($this->numbers);
+ $this->numbers = array();
+ }
+
+ /**
+ * @When /I sub/
+ */
+ public function iSub() {
+ $this->result = array_shift($this->numbers);
+ $this->result -= array_sum($this->numbers);
+ $this->numbers = array();
+ }
+
+ /**
+ * @Then /The result should be (\d+)/
+ */
+ public function theResultShouldBe($result) {
+ PHPUnit_Framework_Assert::assertEquals($result, $this->result);
+ }
+ }
+ """
+ And a file named "features/math.feature" with:
+ """
+ Feature: Math
+ Background:
+ Given I have basic calculator
+
+ Scenario Outline:
+ Given I have entered
+ And I have entered
+ When I add
+ Then The result should be
+
+ Examples:
+ | number1 | number2 | result |
+ | 10 | 12 | 22 |
+ | 5 | 3 | 8 |
+ | 5 | 5 | 10 |
+ """
+ And a file named "behat.yml" with:
+ """
+ default:
+ formatters:
+ progress: ~
+ """
+
+ Scenario:
+ When I run "behat --no-colors"
+ Then it should pass with:
+ """
+ ...............
+
+ 3 scenarios (3 passed)
+ 15 steps (15 passed)
+ """
+
+ Scenario:
+ Given "BEHAT_PARAMS" environment variable is set to:
+ """
+ {"formatters": {"pretty": {"paths": false, "timer": false}}}
+ """
+ And a file named "behat.yml" with:
+ """
+ default:
+ formatters: ~
+ """
+ When I run "behat --no-colors -c unexistent"
+ Then it should pass with:
+ """
+ Feature: Math
+
+ Background:
+ Given I have basic calculator
+
+ Scenario Outline:
+ Given I have entered
+ And I have entered
+ When I add
+ Then The result should be
+
+ Examples:
+ | number1 | number2 | result |
+ | 10 | 12 | 22 |
+ | 5 | 3 | 8 |
+ | 5 | 5 | 10 |
+
+ 3 scenarios (3 passed)
+ 15 steps (15 passed)
+ """
+
+ Scenario:
+ Given "BEHAT_PARAMS" environment variable is set to:
+ """
+ {"formatters": {"pretty": {"timer": false}}}
+ """
+ And a file named "behat.yml" with:
+ """
+ default:
+ formatters: ~
+ """
+ When I run "behat --no-colors -c unexistent"
+ Then it should pass with:
+ """
+ Feature: Math
+
+ Background: # features/math.feature:2
+ Given I have basic calculator # FeatureContext::iHaveBasicCalculator()
+
+ Scenario Outline: # features/math.feature:5
+ Given I have entered # FeatureContext::iHaveEntered()
+ And I have entered # FeatureContext::iHaveEntered()
+ When I add # FeatureContext::iAdd()
+ Then The result should be # FeatureContext::theResultShouldBe()
+
+ Examples:
+ | number1 | number2 | result |
+ | 10 | 12 | 22 |
+ | 5 | 3 | 8 |
+ | 5 | 5 | 10 |
+
+ 3 scenarios (3 passed)
+ 15 steps (15 passed)
+ """
diff --git a/vendor/behat/behat/features/pretty_format.feature b/vendor/behat/behat/features/pretty_format.feature
new file mode 100644
index 0000000..d1a9d90
--- /dev/null
+++ b/vendor/behat/behat/features/pretty_format.feature
@@ -0,0 +1,484 @@
+Feature: Pretty Formatter
+ In order to debug features
+ As a feature writer
+ I need to have pretty formatter
+
+ Scenario: Complex
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ value = $num;
+ }
+
+ /**
+ * @Then /I must have (\d+)/
+ */
+ public function iMustHave($num) {
+ PHPUnit_Framework_Assert::assertEquals($num, $this->value);
+ }
+
+ /**
+ * @When /I add (\d+)/
+ */
+ public function iAdd($num) {
+ $this->value += $num;
+ }
+
+ /**
+ * @When /^Something not done yet$/
+ */
+ public function somethingNotDoneYet() {
+ throw new PendingException();
+ }
+ }
+ """
+ And a file named "features/World.feature" with:
+ """
+ Feature: World consistency
+ In order to maintain stable behaviors
+ As a features developer
+ I want, that "World" flushes between scenarios
+
+ Background:
+ Given I have entered 10
+
+ Scenario: Undefined
+ Then I must have 10
+ And Something new
+ Then I must have 10
+
+ Scenario: Pending
+ Then I must have 10
+ And Something not done yet
+ Then I must have 10
+
+ Scenario: Failed
+ When I add 4
+ Then I must have 13
+
+ Scenario Outline: Passed & Failed
+ Given I must have 10
+ When I add
+ Then I must have
+
+ Examples:
+ | value | result |
+ | 5 | 16 |
+ | 10 | 20 |
+ | 23 | 32 |
+ """
+ When I run "behat --no-colors -f pretty"
+ Then it should fail with:
+ """
+ Feature: World consistency
+ In order to maintain stable behaviors
+ As a features developer
+ I want, that "World" flushes between scenarios
+
+ Background: # features/World.feature:6
+ Given I have entered 10 # FeatureContext::iHaveEntered()
+
+ Scenario: Undefined # features/World.feature:9
+ Then I must have 10 # FeatureContext::iMustHave()
+ And Something new
+ Then I must have 10 # FeatureContext::iMustHave()
+
+ Scenario: Pending # features/World.feature:14
+ Then I must have 10 # FeatureContext::iMustHave()
+ And Something not done yet # FeatureContext::somethingNotDoneYet()
+ TODO: write pending definition
+ Then I must have 10 # FeatureContext::iMustHave()
+
+ Scenario: Failed # features/World.feature:19
+ When I add 4 # FeatureContext::iAdd()
+ Then I must have 13 # FeatureContext::iMustHave()
+ Failed asserting that 14 matches expected '13'.
+
+ Scenario Outline: Passed & Failed # features/World.feature:23
+ Given I must have 10 # FeatureContext::iMustHave()
+ When I add # FeatureContext::iAdd()
+ Then I must have # FeatureContext::iMustHave()
+
+ Examples:
+ | value | result |
+ | 5 | 16 |
+ Failed asserting that 15 matches expected '16'.
+ | 10 | 20 |
+ | 23 | 32 |
+ Failed asserting that 33 matches expected '32'.
+
+ --- Failed scenarios:
+
+ features/World.feature:19
+ features/World.feature:30
+ features/World.feature:32
+
+ 6 scenarios (1 passed, 3 failed, 1 undefined, 1 pending)
+ 23 steps (16 passed, 3 failed, 1 undefined, 1 pending, 2 skipped)
+
+ --- FeatureContext has missing steps. Define them with these snippets:
+
+ /**
+ * @Then /^Something new$/
+ */
+ public function somethingNew()
+ {
+ throw new PendingException();
+ }
+ """
+
+ Scenario: Multiline titles
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ value = $num;
+ }
+
+ /**
+ * @Then /I must have (\d+)/
+ */
+ public function iMustHave($num) {
+ PHPUnit_Framework_Assert::assertEquals($num, $this->value);
+ }
+
+ /**
+ * @When /I (add|subtract) the value (\d+)/
+ */
+ public function iAddOrSubtract($op, $num) {
+ if ($op == 'add')
+ $this->value += $num;
+ elseif ($op == 'subtract')
+ $this->value -= $num;
+ }
+ }
+ """
+ And a file named "features/World.feature" with:
+ """
+ Feature: World consistency
+ In order to maintain stable behaviors
+ As a features developer
+ I want, that "World" flushes between scenarios
+
+ Background:
+ Given I have entered 10
+
+ Scenario: Adding some interesting
+ value
+ Then I must have 10
+ And I add the value 6
+ Then I must have 16
+
+ Scenario: Subtracting
+ some
+ value
+ Then I must have 10
+ And I subtract the value 6
+ Then I must have 4
+ """
+ When I run "behat --no-colors -f pretty"
+ Then it should pass with:
+ """
+ Feature: World consistency
+ In order to maintain stable behaviors
+ As a features developer
+ I want, that "World" flushes between scenarios
+
+ Background: # features/World.feature:6
+ Given I have entered 10 # FeatureContext::iHaveEntered()
+
+ Scenario: Adding some interesting # features/World.feature:9
+ value
+ Then I must have 10 # FeatureContext::iMustHave()
+ And I add the value 6 # FeatureContext::iAddOrSubtract()
+ Then I must have 16 # FeatureContext::iMustHave()
+
+ Scenario: Subtracting # features/World.feature:15
+ some
+ value
+ Then I must have 10 # FeatureContext::iMustHave()
+ And I subtract the value 6 # FeatureContext::iAddOrSubtract()
+ Then I must have 4 # FeatureContext::iMustHave()
+
+ 2 scenarios (2 passed)
+ 8 steps (8 passed)
+ """
+
+ Scenario: Don't print undefined exceptions in outline
+ Given a file named "features/bootstrap/FeatureContext.php" with:
+ """
+ value);
+ }
+
+ /**
+ * @When /I add "([^"]+)"/
+ */
+ public function iAdd($num) {
+ $this->value += intval(preg_replace('/[^\d]+/', '', $num));
+ }
+ }
+ """
+ And a file named "features/ls.feature" with:
+ """
+ Feature: ls
+ In order to see the directory structure
+ As a UNIX user
+ I need to be able to list the current directory's contents
+
+ Background:
+ Given I have a file named "foo"
+
+ Scenario: List 2 files in a directory
+ Given I have a file named "bar"
+ When I run "ls"
+ Then I should see "bar" in output
+ And I should see "foo" in output
+
+ Scenario: List 1 file and 1 dir
+ Given I have a directory named "dir"
+ When I run "ls"
+ Then I should see "dir" in output
+ And I should see "foo" in output
+
+ Scenario Outline:
+ Given I have a