diff --git a/bin/all-checks b/bin/all-checks new file mode 100755 index 000000000..d9dc95cda --- /dev/null +++ b/bin/all-checks @@ -0,0 +1,5 @@ +# Copyright © Magento, Inc. All rights reserved. +# See COPYING.txt for license details. + +bin/static-checks +bin/phpunit-checks diff --git a/bin/phpunit-checks b/bin/phpunit-checks new file mode 100755 index 000000000..a35595834 --- /dev/null +++ b/bin/phpunit-checks @@ -0,0 +1,8 @@ +# Copyright © Magento, Inc. All rights reserved. +# See COPYING.txt for license details. + +echo "===============================UNIT TESTS===============================" +vendor/bin/phpunit --configuration dev/tests/phpunit.xml --testsuite unit + +echo "===============================VERIFICATION TESTS===============================" +vendor/bin/phpunit --configuration dev/tests/phpunit.xml --testsuite verification diff --git a/bin/static-checks b/bin/static-checks new file mode 100755 index 000000000..e1ddd268a --- /dev/null +++ b/bin/static-checks @@ -0,0 +1,11 @@ +# Copyright © Magento, Inc. All rights reserved. +# See COPYING.txt for license details. + +echo "===============================PHP CODE SNIFFER REPORT===============================" +vendor/bin/phpcs ./src --standard=./dev/tests/static/Magento + +echo "===============================COPY PASTE DETECTOR REPORT===============================" +vendor/bin/phpcpd ./src + +echo "===============================MAGENTO COPYRIGHT REPORT===============================" +bin/copyright-check diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 60d4dc14f..000000000 --- a/composer.lock +++ /dev/null @@ -1,2713 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "6a845d91aa6c99cce577f96862648392", - "packages": [ - { - "name": "behat/gherkin", - "version": "v4.4.5", - "source": { - "type": "git", - "url": "https://github.com/Behat/Gherkin.git", - "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74", - "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74", - "shasum": "" - }, - "require": { - "php": ">=5.3.1" - }, - "require-dev": { - "phpunit/phpunit": "~4.5|~5", - "symfony/phpunit-bridge": "~2.7|~3", - "symfony/yaml": "~2.3|~3" - }, - "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": "2016-10-30T11:50:56+00:00" - }, - { - "name": "codeception/codeception", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/Codeception/Codeception.git", - "reference": "b54eaf4007484f36145c1dc8c64da1874adbc340" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b54eaf4007484f36145c1dc8c64da1874adbc340", - "reference": "b54eaf4007484f36145c1dc8c64da1874adbc340", - "shasum": "" - }, - "require": { - "behat/gherkin": "~4.4.0", - "ext-json": "*", - "ext-mbstring": "*", - "facebook/webdriver": ">=1.0.1 <2.0", - "guzzlehttp/guzzle": ">=4.1.4 <7.0", - "guzzlehttp/psr7": "~1.0", - "php": ">=5.4.0 <8.0", - "phpunit/php-code-coverage": ">=2.2.4 <6.0", - "phpunit/phpunit": ">4.8.20 <6.0", - "phpunit/phpunit-mock-objects": ">2.3 <5.0", - "sebastian/comparator": ">1.1 <3.0", - "sebastian/diff": "^1.4", - "stecman/symfony-console-completion": "^0.7.0", - "symfony/browser-kit": ">=2.7 <4.0", - "symfony/console": ">=2.7 <4.0", - "symfony/css-selector": ">=2.7 <4.0", - "symfony/dom-crawler": ">=2.7.5 <4.0", - "symfony/event-dispatcher": ">=2.7 <4.0", - "symfony/finder": ">=2.7 <4.0", - "symfony/yaml": ">=2.7 <4.0" - }, - "require-dev": { - "codeception/specify": "~0.3", - "facebook/graph-sdk": "~5.3", - "flow/jsonpath": "~0.2", - "league/factory-muffin": "^3.0", - "league/factory-muffin-faker": "^1.0", - "mongodb/mongodb": "^1.0", - "monolog/monolog": "~1.8", - "pda/pheanstalk": "~3.0", - "php-amqplib/php-amqplib": "~2.4", - "predis/predis": "^1.0", - "squizlabs/php_codesniffer": "~2.0", - "vlucas/phpdotenv": "^2.4.0" - }, - "suggest": { - "codeception/specify": "BDD-style code blocks", - "codeception/verify": "BDD-style assertions", - "flow/jsonpath": "For using JSONPath in REST module", - "league/factory-muffin": "For DataFactory module", - "league/factory-muffin-faker": "For Faker support in DataFactory module", - "phpseclib/phpseclib": "for SFTP option in FTP Module", - "symfony/phpunit-bridge": "For phpunit-bridge support" - }, - "bin": [ - "codecept" - ], - "type": "library", - "extra": { - "branch-alias": [] - }, - "autoload": { - "psr-4": { - "Codeception\\": "src\\Codeception", - "Codeception\\Extension\\": "ext" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - } - ], - "description": "BDD-style testing framework", - "homepage": "http://codeception.com/", - "keywords": [ - "BDD", - "TDD", - "acceptance testing", - "functional testing", - "unit testing" - ], - "time": "2017-05-22T23:47:35+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2017-07-22T11:58:36+00:00" - }, - { - "name": "facebook/webdriver", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/facebook/php-webdriver.git", - "reference": "eadb0b7a7c3e6578185197fd40158b08c3164c83" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/eadb0b7a7c3e6578185197fd40158b08c3164c83", - "reference": "eadb0b7a7c3e6578185197fd40158b08c3164c83", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-zip": "*", - "php": "^5.5 || ~7.0", - "symfony/process": "^2.8 || ^3.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "php-mock/php-mock-phpunit": "^1.1", - "phpunit/phpunit": "4.6.* || ~5.0", - "satooshi/php-coveralls": "^1.0", - "squizlabs/php_codesniffer": "^2.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-community": "1.5-dev" - } - }, - "autoload": { - "psr-4": { - "Facebook\\WebDriver\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "A PHP client for Selenium WebDriver", - "homepage": "https://github.com/facebook/php-webdriver", - "keywords": [ - "facebook", - "php", - "selenium", - "webdriver" - ], - "time": "2017-04-28T14:54:49+00:00" - }, - { - "name": "flow/jsonpath", - "version": "0.3.4", - "source": { - "type": "git", - "url": "https://github.com/FlowCommunications/JSONPath.git", - "reference": "00aa9c361e4d0a210dd95f3c917a1e0dde3a957f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FlowCommunications/JSONPath/zipball/00aa9c361e4d0a210dd95f3c917a1e0dde3a957f", - "reference": "00aa9c361e4d0a210dd95f3c917a1e0dde3a957f", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "peekmo/jsonpath": "dev-master", - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Flow\\JSONPath": "src/", - "Flow\\JSONPath\\Test": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stephen Frank", - "email": "stephen@flowsa.com" - } - ], - "description": "JSONPath implementation for parsing, searching and flattening arrays", - "time": "2016-09-06T17:43:18+00:00" - }, - { - "name": "fzaninotto/faker", - "version": "v1.7.1", - "source": { - "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "ext-intl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", - "squizlabs/php_codesniffer": "^1.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Faker\\": "src/Faker/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "François Zaninotto" - } - ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ], - "time": "2017-08-15T16:48:10+00:00" - }, - { - "name": "guzzlehttp/guzzle", - "version": "6.3.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2017-06-22T18:50:49+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20T10:07:11+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2017-03-20T17:10:46+00:00" - }, - { - "name": "mustache/mustache", - "version": "v2.12.0", - "source": { - "type": "git", - "url": "https://github.com/bobthecow/mustache.php.git", - "reference": "fe8fe72e9d580591854de404cc59a1b83ca4d19e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/fe8fe72e9d580591854de404cc59a1b83ca4d19e", - "reference": "fe8fe72e9d580591854de404cc59a1b83ca4d19e", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~1.11", - "phpunit/phpunit": "~3.7|~4.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Mustache": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Justin Hileman", - "email": "justin@justinhileman.info", - "homepage": "http://justinhileman.com" - } - ], - "description": "A Mustache implementation in PHP.", - "homepage": "https://github.com/bobthecow/mustache.php", - "keywords": [ - "mustache", - "templating" - ], - "time": "2017-07-11T12:54:05+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2017-04-12T18:52:22+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.1.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2", - "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-08-30T18:51:59+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.7.2", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2017-09-04T11:05:03+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.2 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", - "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "^1.0 || ^2.0" - }, - "require-dev": { - "ext-xdebug": "^2.1.4", - "phpunit/phpunit": "^5.7" - }, - "suggest": { - "ext-xdebug": "^2.5.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2017-04-02T07:44:40+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2016-10-03T07:40:28+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0", - "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2017-08-20T05:47:52+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "5.7.23", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "78532d5269d984660080d8e0f4c99c5c2ea65ffe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/78532d5269d984660080d8e0f4c99c5c2ea65ffe", - "reference": "78532d5269d984660080d8e0f4c99c5c2ea65ffe", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.6.2", - "phpunit/php-code-coverage": "^4.0.4", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "^1.2.4", - "sebastian/diff": "^1.4.3", - "sebastian/environment": "^1.3.4 || ^2.0", - "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.1", - "sebastian/object-enumerator": "~2.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2017-10-15T06:13:55+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "3.4.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", - "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" - }, - "conflict": { - "phpunit/phpunit": "<5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2017-06-30T09:13:00+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2017-05-22T07:24:03+00:00" - }, - { - "name": "sebastian/environment", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-11-26T07:53:53+00:00" - }, - { - "name": "sebastian/exporter", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~2.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-11-19T08:54:04+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18T15:18:39+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19T07:33:16+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "stecman/symfony-console-completion", - "version": "0.7.0", - "source": { - "type": "git", - "url": "https://github.com/stecman/symfony-console-completion.git", - "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/5461d43e53092b3d3b9dbd9d999f2054730f4bbb", - "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "symfony/console": "~2.3 || ~3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Stecman\\Component\\Symfony\\Console\\BashCompletion\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stephen Holdaway", - "email": "stephen@stecman.co.nz" - } - ], - "description": "Automatic BASH completion for Symfony Console Component based applications.", - "time": "2016-02-24T05:08:54+00:00" - }, - { - "name": "symfony/browser-kit", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/browser-kit.git", - "reference": "317d5bdf0127f06db7ea294186132b4f5b036839" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/317d5bdf0127f06db7ea294186132b4f5b036839", - "reference": "317d5bdf0127f06db7ea294186132b4f5b036839", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/dom-crawler": "~2.8|~3.0" - }, - "require-dev": { - "symfony/css-selector": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\BrowserKit\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "https://symfony.com", - "time": "2017-10-02T06:42:24+00:00" - }, - { - "name": "symfony/console", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "116bc56e45a8e5572e51eb43ab58c769a352366c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/116bc56e45a8e5572e51eb43ab58c769a352366c", - "reference": "116bc56e45a8e5572e51eb43ab58c769a352366c", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/debug": "~2.8|~3.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/filesystem": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2017-10-02T06:42:24+00:00" - }, - { - "name": "symfony/css-selector", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "07447650225ca9223bd5c97180fe7c8267f7d332" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/07447650225ca9223bd5c97180fe7c8267f7d332", - "reference": "07447650225ca9223bd5c97180fe7c8267f7d332", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\CssSelector\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "https://symfony.com", - "time": "2017-10-02T06:42:24+00:00" - }, - { - "name": "symfony/debug", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd", - "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2017-10-02T06:42:24+00:00" - }, - { - "name": "symfony/dom-crawler", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/dom-crawler.git", - "reference": "40dafd42d5dad7fe5ad4e958413d92a207522ac1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/40dafd42d5dad7fe5ad4e958413d92a207522ac1", - "reference": "40dafd42d5dad7fe5ad4e958413d92a207522ac1", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "symfony/css-selector": "~2.8|~3.0" - }, - "suggest": { - "symfony/css-selector": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DomCrawler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "https://symfony.com", - "time": "2017-10-02T06:42:24+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d7ba037e4b8221956ab1e221c73c9e27e05dd423" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d7ba037e4b8221956ab1e221c73c9e27e05dd423", - "reference": "d7ba037e4b8221956ab1e221c73c9e27e05dd423", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "conflict": { - "symfony/dependency-injection": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/expression-language": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2017-10-02T06:42:24+00:00" - }, - { - "name": "symfony/finder", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "773e19a491d97926f236942484cb541560ce862d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/773e19a491d97926f236942484cb541560ce862d", - "reference": "773e19a491d97926f236942484cb541560ce862d", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2017-10-02T06:42:24+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", - "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2017-10-11T12:05:26+00:00" - }, - { - "name": "symfony/process", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "fdf89e57a723a29baf536e288d6e232c059697b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/fdf89e57a723a29baf536e288d6e232c059697b1", - "reference": "fdf89e57a723a29baf536e288d6e232c059697b1", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2017-10-02T06:42:24+00:00" - }, - { - "name": "symfony/yaml", - "version": "v3.3.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46", - "reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-10-05T14:43:42+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2016-11-23T20:04:58+00:00" - } - ], - "packages-dev": [ - { - "name": "sebastian/finder-facade", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9", - "reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9", - "shasum": "" - }, - "require": { - "symfony/finder": "~2.3|~3.0", - "theseer/fdomdocument": "~1.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", - "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2016-02-17T07:02:23+00:00" - }, - { - "name": "sebastian/phpcpd", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpcpd.git", - "reference": "d7006078b75a34c9250831c3453a2e256a687615" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/d7006078b75a34c9250831c3453a2e256a687615", - "reference": "d7006078b75a34c9250831c3453a2e256a687615", - "shasum": "" - }, - "require": { - "php": "^5.6|^7.0", - "phpunit/php-timer": "^1.0.6", - "sebastian/finder-facade": "^1.1", - "sebastian/version": "^2.0", - "symfony/console": "^3.0" - }, - "bin": [ - "phpcpd" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Copy/Paste Detector (CPD) for PHP code.", - "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2017-02-05T07:48:01+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "1.5.3", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "396178ada8499ec492363587f037125bf7b07fcc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/396178ada8499ec492363587f037125bf7b07fcc", - "reference": "396178ada8499ec492363587f037125bf7b07fcc", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.1.2" - }, - "suggest": { - "phpunit/php-timer": "dev-master" - }, - "bin": [ - "scripts/phpcs" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-phpcs-fixer": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/CommentParser/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2014-05-01T03:07:07+00:00" - }, - { - "name": "theseer/fdomdocument", - "version": "1.6.6", - "source": { - "type": "git", - "url": "https://github.com/theseer/fDOMDocument.git", - "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/6e8203e40a32a9c770bcb62fe37e68b948da6dca", - "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "lib-libxml": "*", - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "lead" - } - ], - "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", - "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2017-06-30T11:53:12+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "~7.0" - }, - "platform-dev": [] -} diff --git a/dev/_suite/functionalSuite.xml b/dev/_suite/functionalSuite.xml index 62f97fdc7..ae372cf00 100644 --- a/dev/_suite/functionalSuite.xml +++ b/dev/_suite/functionalSuite.xml @@ -10,12 +10,12 @@ - - + + - + - \ No newline at end of file + diff --git a/dev/tests/unit/Magento/FunctionalTestFramework/Test/Util/ActionMergeUtilTest.php b/dev/tests/unit/Magento/FunctionalTestFramework/Test/Util/ActionMergeUtilTest.php index 1c5d68724..495f6eff1 100644 --- a/dev/tests/unit/Magento/FunctionalTestFramework/Test/Util/ActionMergeUtilTest.php +++ b/dev/tests/unit/Magento/FunctionalTestFramework/Test/Util/ActionMergeUtilTest.php @@ -30,7 +30,7 @@ class ActionMergeUtilTest extends TestCase */ public static function setUpBeforeClass() { - self::$MERGE_UTIL = new ActionMergeUtil(); + self::$MERGE_UTIL = new ActionMergeUtil("actionMergeUtilTest", "TestCase"); } /** @@ -149,7 +149,7 @@ public function testResolveActionStepEntityData() $this->assertEquals($userinputValue, $actions[$actionName]->getCustomActionAttributes()[$userInputKey]); - $mergeUtil = new ActionMergeUtil(); + $mergeUtil = new ActionMergeUtil("test", "TestCase"); $resolvedActions = $mergeUtil->resolveActionSteps($actions); $this->assertEquals($dataFieldValue, $resolvedActions[$actionName]->getCustomActionAttributes()[$userInputKey]); diff --git a/dev/tests/verification/Resources/ActionGroupFunctionalCest.txt b/dev/tests/verification/Resources/ActionGroupFunctionalCest.txt new file mode 100644 index 000000000..a2b40ac98 --- /dev/null +++ b/dev/tests/verification/Resources/ActionGroupFunctionalCest.txt @@ -0,0 +1,164 @@ +amGoingTo("create entity that has the mergeKey: createPersonParam"); + $ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson"); + $this->createPersonParam = new DataPersistenceHandler($ReplacementPerson); + $this->createPersonParam->createEntity(); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function BasicActionGroupTest(AcceptanceTester $I) + { + $I->amOnPage("/someUrl"); + $I->fillField("#foo", "myData1"); + $I->fillField("#bar", "myData2"); + $I->click("loginButton"); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function ActionGroupWithDataTest(AcceptanceTester $I) + { + $I->amOnPage("/someUrl"); + $I->amOnPage("/Jane/Dane.html"); + $I->fillField("#foo", "Jane"); + $I->fillField("#bar", "Dane"); + $I->searchAndMultiSelectOption("#foo", ["Jane", "Dane"]); + $I->see("#element .Jane"); + $I->click("loginButton"); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function ActionGroupWithDataOverrideTest(AcceptanceTester $I) + { + $I->amOnPage("/someUrl"); + $I->amOnPage("/John/Doe.html"); + $I->fillField("#foo", "John"); + $I->fillField("#bar", "Doe"); + $I->searchAndMultiSelectOption("#foo", ["John", "Doe"]); + $I->see("#element .John"); + $I->click("loginButton"); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function ActionGroupWithNoDefaultTest(AcceptanceTester $I) + { + $I->amOnPage("/someUrl"); + $I->fillField("#foo", "Jane"); + $I->fillField("#bar", "Dane"); + $I->see("#Jane .Dane"); + $I->click("loginButton"); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function ActionGroupWithPersistedData(AcceptanceTester $I) + { + $I->amGoingTo("create entity that has the mergeKey: createPerson"); + $DefaultPerson = DataObjectHandler::getInstance()->getObject("DefaultPerson"); + $createPerson = new DataPersistenceHandler($DefaultPerson); + $createPerson->createEntity(); + $I->amOnPage("/" . $createPerson->getCreatedDataByName('firstname') . "/" . $createPerson->getCreatedDataByName('lastname') . ".html"); + $I->fillField("#foo", $createPerson->getCreatedDataByName('firstname')); + $I->fillField("#bar", $createPerson->getCreatedDataByName('lastname')); + $I->searchAndMultiSelectOption("#foo", [$createPerson->getCreatedDataByName('firstname') . "", "" . $createPerson->getCreatedDataByName('lastname')]); + $I->see("#element ." . $createPerson->getCreatedDataByName('firstname')); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function ActionGroupWithTopLevelPersistedData(AcceptanceTester $I) + { + $I->amOnPage("/" . $this->createPersonParam->getCreatedDataByName('firstname') . "/" . $this->createPersonParam->getCreatedDataByName('lastname') . ".html"); + $I->fillField("#foo", $this->createPersonParam->getCreatedDataByName('firstname')); + $I->fillField("#bar", $this->createPersonParam->getCreatedDataByName('lastname')); + $I->searchAndMultiSelectOption("#foo", [$this->createPersonParam->getCreatedDataByName('firstname') . "", "" . $this->createPersonParam->getCreatedDataByName('lastname')]); + $I->see("#element ." . $this->createPersonParam->getCreatedDataByName('firstname')); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function MultipleActionGroupsTest(AcceptanceTester $I) + { + $I->amOnPage("/someUrl"); + $I->amOnPage("/Jane/Dane.html"); + $I->fillField("#foo", "Jane"); + $I->fillField("#bar", "Dane"); + $I->searchAndMultiSelectOption("#foo", ["Jane", "Dane"]); + $I->see("#element .Jane"); + $I->click("loginButton"); + $I->amOnPage("/John/Doe.html"); + $I->fillField("#foo", "John"); + $I->fillField("#bar", "Doe"); + $I->searchAndMultiSelectOption("#foo", ["John", "Doe"]); + $I->see("#element .John"); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function MergedActionGroupTest(AcceptanceTester $I) + { + $I->see("#element .Jane"); + $I->see(".merge .Jane"); + $I->click(".merge .Dane"); + $I->amOnPage("/Jane/Dane.html"); + } + +} diff --git a/dev/tests/verification/Resources/BasicFunctionalCest.txt b/dev/tests/verification/Resources/BasicFunctionalCest.txt index f17e73e1e..94bba2310 100644 --- a/dev/tests/verification/Resources/BasicFunctionalCest.txt +++ b/dev/tests/verification/Resources/BasicFunctionalCest.txt @@ -89,7 +89,10 @@ class BasicFunctionalCest $I->moveMouseOver(".functionalTestSelector"); $I->openNewTab(); $I->pauseExecution(); - $I->pressKey(".functionalTestSelector"); + $I->pressKey("#page", "a"); + $I->pressKey("#page", ['ctrl','a'],'new'); + $I->pressKey("#page", ['shift','111'],'1','x'); + $I->pressKey("#page", ['ctrl', 'a'],\Facebook\WebDriver\WebDriverKeys::DELETE); $I->reloadPage(); $I->resetCookie("cookieInput"); $I->resizeWindow(0, 0); diff --git a/dev/tests/verification/Resources/MergeFunctionalCest.txt b/dev/tests/verification/Resources/MergeFunctionalCest.txt new file mode 100644 index 000000000..9645490bb --- /dev/null +++ b/dev/tests/verification/Resources/MergeFunctionalCest.txt @@ -0,0 +1,69 @@ +amOnPage("/beforeUrl"); + $I->see("#before2"); + } + + public function _after(AcceptanceTester $I) + { + $I->amOnPage("/afterUrl1"); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function BasicMergeTest(AcceptanceTester $I) + { + $I->amOnPage("/step1"); + $I->click("#step2"); + $I->fillField("#username", "step3"); + $I->click("#step4"); + $I->fillField("#password", "step5"); + $I->click("#step6Merged"); + $I->click("#element .Jane .step7Merge"); + $I->amOnPage("/Jane/Dane.html"); + $I->fillField("#foo", "Jane"); + $I->fillField("#bar", "Dane"); + $I->searchAndMultiSelectOption("#foo", ["Jane", "Dane"]); + $I->see("#element .Jane"); + } + + /** + * @Parameter(name = "AcceptanceTester", value="$I") + * @param AcceptanceTester $I + * @return void + */ + public function MergedReferencesTest(AcceptanceTester $I) + { + $I->fillField("#merge", "merged"); + $I->fillField("#newElement", "newField"); + } + +} diff --git a/dev/tests/verification/Resources/ParameterArrayCest.txt b/dev/tests/verification/Resources/ParameterArrayCest.txt new file mode 100644 index 000000000..1e4ae4b39 --- /dev/null +++ b/dev/tests/verification/Resources/ParameterArrayCest.txt @@ -0,0 +1,42 @@ +amGoingTo("create entity that has the mergeKey: simpleDataKey"); + $simpleParamData = DataObjectHandler::getInstance()->getObject("simpleParamData"); + $simpleDataKey = new DataPersistenceHandler($simpleParamData); + $simpleDataKey->createEntity(); + $I->searchAndMultiSelectOption("#selector", ["name"]); + $I->searchAndMultiSelectOption("#selector", [msq("simpleParamData")."prename"]); + $I->searchAndMultiSelectOption("#selector", ["postname".msq("simpleParamData")]); + $I->searchAndMultiSelectOption("#selector", [$simpleDataKey->getCreatedDataByName('name')]); + $I->searchAndMultiSelectOption("#selector", ["name", "" . $simpleDataKey->getCreatedDataByName('name')]); + $I->searchAndMultiSelectOption("#selector", ['someKey' => $simpleDataKey->getCreatedDataByName('name')]); + $I->searchAndMultiSelectOption("#selector", ['someKey' => "name"]); + $I->searchAndMultiSelectOption("#selector", ['someKey' => msq("simpleParamData")."prename"]); + $I->searchAndMultiSelectOption("#selector", ['someKey' => "postname".msq("simpleParamData")]); + } +} diff --git a/dev/tests/verification/Resources/PersistedReplacementCest.txt b/dev/tests/verification/Resources/PersistedReplacementCest.txt index 3ef3379cf..d52b74930 100644 --- a/dev/tests/verification/Resources/PersistedReplacementCest.txt +++ b/dev/tests/verification/Resources/PersistedReplacementCest.txt @@ -26,8 +26,8 @@ class PersistedReplacementCest public function _before(AcceptanceTester $I) { $I->amGoingTo("create entity that has the mergeKey: createData1"); - $replacementPerson = DataObjectHandler::getInstance()->getObject("replacementPerson"); - $this->createData1 = new DataPersistenceHandler($replacementPerson); + $ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson"); + $this->createData1 = new DataPersistenceHandler($ReplacementPerson); $this->createData1->createEntity(); } @@ -39,12 +39,12 @@ class PersistedReplacementCest public function PersistedReplacementTest(AcceptanceTester $I) { $I->amGoingTo("create entity that has the mergeKey: testScopeData"); - $replacementPerson = DataObjectHandler::getInstance()->getObject("replacementPerson"); - $testScopeData = new DataPersistenceHandler($replacementPerson); + $ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson"); + $testScopeData = new DataPersistenceHandler($ReplacementPerson); $testScopeData->createEntity(); $I->amGoingTo("create entity that has the mergeKey: uniqueData"); - $uniquePerson = DataObjectHandler::getInstance()->getObject("uniquePerson"); - $uniqueData = new DataPersistenceHandler($uniquePerson); + $UniquePerson = DataObjectHandler::getInstance()->getObject("UniquePerson"); + $uniqueData = new DataPersistenceHandler($UniquePerson); $uniqueData->createEntity(); $I->amOnPage("/success/success2.html"); $I->amOnPage($testScopeData->getCreatedDataByName('firstname') . ".html"); diff --git a/dev/tests/verification/Resources/testSuiteGeneration1.txt b/dev/tests/verification/Resources/testSuiteGeneration1.txt index 797b3c2a1..620dacd7e 100644 --- a/dev/tests/verification/Resources/testSuiteGeneration1.txt +++ b/dev/tests/verification/Resources/testSuiteGeneration1.txt @@ -1,4 +1,4 @@ -dev/tests/verification/_generated/functionalSuite1/sampleSuite3Cest.php:includeTest --env chrome -dev/tests/verification/_generated/functionalSuite1/sampleSuite5Cest.php:additionalTest --env chrome -dev/tests/verification/_generated/functionalSuite1/sampleSuiteCest.php:includeTest --env chrome -dev/tests/verification/_generated/functionalSuite1/sampleSuite4Cest.php:includeTest --env chrome +dev/tests/verification/_generated/functionalSuite1/SampleSuite3Cest.php:IncludeTest +dev/tests/verification/_generated/functionalSuite1/SampleSuite5Cest.php:additionalTest +dev/tests/verification/_generated/functionalSuite1/SampleSuiteCest.php:IncludeTest +dev/tests/verification/_generated/functionalSuite1/SampleSuite4Cest.php:IncludeTest diff --git a/dev/tests/verification/TestModule/ActionGroup/FunctionalActionGroup.xml b/dev/tests/verification/TestModule/ActionGroup/FunctionalActionGroup.xml new file mode 100644 index 000000000..a4b1e4cd6 --- /dev/null +++ b/dev/tests/verification/TestModule/ActionGroup/FunctionalActionGroup.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/verification/TestModule/ActionGroup/MergeFunctionalActionGroup.xml b/dev/tests/verification/TestModule/ActionGroup/MergeFunctionalActionGroup.xml new file mode 100644 index 000000000..37f648f43 --- /dev/null +++ b/dev/tests/verification/TestModule/ActionGroup/MergeFunctionalActionGroup.xml @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/dev/tests/verification/TestModule/ActionObject/placeholder.txt b/dev/tests/verification/TestModule/ActionObject/placeholder.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/dev/tests/verification/TestModule/Cest/ActionGroupFunctionalCest.xml b/dev/tests/verification/TestModule/Cest/ActionGroupFunctionalCest.xml new file mode 100644 index 000000000..2237853f3 --- /dev/null +++ b/dev/tests/verification/TestModule/Cest/ActionGroupFunctionalCest.xml @@ -0,0 +1,71 @@ + + + + + + + + + <group value="functional"/> + <features value="Action Group Functional Cest"/> + <stories value="MQE-433"/> + </annotations> + <before> + <createData entity="ReplacementPerson" mergeKey="createPersonParam"/> + </before> + <test name="BasicActionGroupTest"> + <amOnPage mergeKey="step1" url="/someUrl"/> + <actionGroup ref="FunctionalActionGroup" mergeKey="actionGroup1"/> + <click mergeKey="step6" selector="loginButton"/> + </test> + <test name="ActionGroupWithDataTest"> + <amOnPage mergeKey="step1" url="/someUrl"/> + <actionGroup ref="FunctionalActionGroupWithData" mergeKey="actionGroupWithData1"/> + <click mergeKey="step6" selector="loginButton"/> + </test> + <test name="ActionGroupWithDataOverrideTest"> + <amOnPage mergeKey="step1" url="/someUrl"/> + <actionGroup ref="FunctionalActionGroupWithData" mergeKey="actionGroupWithDataOverride1"> + <argument name="person" value="ReplacementPerson"/> + </actionGroup> + <click mergeKey="step6" selector="loginButton"/> + </test> + <test name="ActionGroupWithNoDefaultTest"> + <amOnPage mergeKey="step1" url="/someUrl"/> + <actionGroup ref="FunctionalActionGroupNoDefault" mergeKey="actionGroupWithDataOverride1"> + <argument name="person" value="DefaultPerson"/> + </actionGroup> + <click mergeKey="step6" selector="loginButton"/> + </test> + <test name="ActionGroupWithPersistedData"> + <createData entity="DefaultPerson" mergeKey="createPerson"/> + <actionGroup ref="FunctionalActionGroupWithData" mergeKey="actionGroupWithPersistedData1"> + <argument name="person" value="$createPerson$"/> + </actionGroup> + </test> + <test name="ActionGroupWithTopLevelPersistedData"> + <actionGroup ref="FunctionalActionGroupWithData" mergeKey="actionGroupWithPersistedData1"> + <argument name="person" value="$$createPersonParam$$"/> + </actionGroup> + </test> + <test name="MultipleActionGroupsTest"> + <amOnPage mergeKey="step1" url="/someUrl"/> + <actionGroup ref="FunctionalActionGroupWithData" mergeKey="actionGroup1"/> + <click mergeKey="step6" selector="loginButton"/> + <actionGroup ref="FunctionalActionGroupWithData" mergeKey="actionGroupWithDataOverride2"> + <argument name="person" value="ReplacementPerson"/> + </actionGroup> + </test> + <test name="MergedActionGroupTest"> + <actionGroup ref="FunctionalActionGroupForMerge" mergeKey="actionGroupForMerge"> + <argument name="myArg" value="DefaultPerson"/> + </actionGroup> + </test> + </cest> +</config> diff --git a/dev/tests/verification/TestModule/Cest/MergeBaseFunctionalCest.xml b/dev/tests/verification/TestModule/Cest/MergeBaseFunctionalCest.xml new file mode 100644 index 000000000..01801c15b --- /dev/null +++ b/dev/tests/verification/TestModule/Cest/MergeBaseFunctionalCest.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <cest name="MergeFunctionalCest"> + <annotations> + <severity value="CRITICAL"/> + <title value="A Functional Cest"/> + <group value="functional"/> + <features value="Merge Functional Cest"/> + <stories value="MQE-433"/> + </annotations> + <before> + <amOnPage url="/beforeUrl" mergeKey="before1"/> + </before> + <after> + <amOnPage url="/afterUrl" mergeKey="after1"/> + </after> + <test name="BasicMergeTest"> + <amOnPage mergeKey="step1" url="/step1"/> + <fillField mergeKey="step3" selector="#username" userInput="step3"/> + <fillField mergeKey="step5" selector="#password" userInput="step5"/> + <click mergeKey="step6" selector=".step6"/> + </test> + <test name="MergedReferencesTest"> + <fillField mergeKey="fillField1" selector="{{SampleSection.mergeElement}}" userInput="{{DefaultPerson.mergedField}}"/> + <fillField mergeKey="fillField2" selector="{{SampleSection.newElement}}" userInput="{{DefaultPerson.newField}}" /> + </test> + </cest> +</config> diff --git a/dev/tests/verification/TestModule/Cest/MergeInFunctionalCest.xml b/dev/tests/verification/TestModule/Cest/MergeInFunctionalCest.xml new file mode 100644 index 000000000..304000252 --- /dev/null +++ b/dev/tests/verification/TestModule/Cest/MergeInFunctionalCest.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <cest name="MergeFunctionalCest"> + <annotations> + <group value="mergeTest"/> + </annotations> + <before> + <see mergeKey="before2" selector="#before2" after="before1"/> + </before> + <after> + <amOnPage url="/afterUrl1" mergeKey="after1"/> + </after> + <test name="BasicMergeTest"> + <click mergeKey="step7Merge" selector="{{SampleSection.oneParamElement(DefaultPerson.firstname)}} .step7Merge" after="step6Merge"/> + <click mergeKey="step2" selector="#step2" after="step1"/> + <click mergeKey="step4" selector="#step4" before="step5"/> + <click mergeKey="step6" remove="true"/> + <click mergeKey="step6Merge" selector="#step6Merged" after="step5"/> + <actionGroup ref="FunctionalActionGroupWithData" mergeKey="step8Merge" after="step7Merge"/> + </test> + </cest> +</config> diff --git a/dev/tests/verification/TestModule/Cest/ParameterArrayCest.xml b/dev/tests/verification/TestModule/Cest/ParameterArrayCest.xml new file mode 100644 index 000000000..8bd88fdd7 --- /dev/null +++ b/dev/tests/verification/TestModule/Cest/ParameterArrayCest.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../../../../magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <cest name="ParameterArrayCest"> + <test name="ParameterArrayTest"> + <createData entity="simpleParamData" mergeKey="simpleDataKey"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="[{{simpleParamData.name}}]" mergeKey="xmlSimpleReplace"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="[{{simpleParamData.uniqueNamePre}}]" mergeKey="xmlPrefix"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="[{{simpleParamData.uniqueNamePost}}]" mergeKey="xmlSuffix"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="[$simpleDataKey.name$]" mergeKey="persistSimple"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="[{{simpleParamData.name}}, $simpleDataKey.name$]" mergeKey="persistXmlSimple"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="['someKey' => $simpleDataKey.name$]" mergeKey="literalKeyToPersist"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="['someKey' => {{simpleParamData.name}}]" mergeKey="literalKeyToStatic"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="['someKey' => {{simpleParamData.uniqueNamePre}}]" mergeKey="literalKeyToPrefixUnique"/> + <searchAndMultiSelectOption selector="#selector" parameterArray="['someKey' => {{simpleParamData.uniqueNamePost}}]" mergeKey="literalKeyToSuffixUnique"/> + </test> + </cest> +</config> diff --git a/dev/tests/verification/TestModule/Cest/persistedReplacementCest.xml b/dev/tests/verification/TestModule/Cest/PersistedReplacementCest.xml similarity index 92% rename from dev/tests/verification/TestModule/Cest/persistedReplacementCest.xml rename to dev/tests/verification/TestModule/Cest/PersistedReplacementCest.xml index 17a6fba36..48cff411e 100644 --- a/dev/tests/verification/TestModule/Cest/persistedReplacementCest.xml +++ b/dev/tests/verification/TestModule/Cest/PersistedReplacementCest.xml @@ -10,11 +10,11 @@ xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <cest name="PersistedReplacementCest"> <before> - <createData entity="replacementPerson" mergeKey="createData1"/> + <createData entity="ReplacementPerson" mergeKey="createData1"/> </before> <test name="PersistedReplacementTest"> - <createData entity="replacementPerson" mergeKey="testScopeData"/> - <createData entity="uniquePerson" mergeKey="uniqueData"/> + <createData entity="ReplacementPerson" mergeKey="testScopeData"/> + <createData entity="UniquePerson" mergeKey="uniqueData"/> <!-- parameterized url that uses literal params --> <amOnPage url="{{SamplePage.url('success','success2')}}" mergeKey="a0"/> @@ -34,7 +34,7 @@ <click selector="{{SampleSection.twoParamElement($testScopeData.firstname$,'success')}}" mergeKey="c2"/> <!-- parameterized selector with literal, static data, and created data --> - <click selector="{{SampleSection.threeParamElement('John', replacementPerson.lastname, $testScopeData.lastname$)}}" + <click selector="{{SampleSection.threeParamElement('John', ReplacementPerson.lastname, $testScopeData.lastname$)}}" mergeKey="c3"/> <!-- selector that uses created data --> @@ -64,4 +64,4 @@ </test> </cest> -</config> \ No newline at end of file +</config> diff --git a/dev/tests/verification/TestModule/Cest/sampleSuiteCest.xml b/dev/tests/verification/TestModule/Cest/SampleSuiteCest.xml similarity index 90% rename from dev/tests/verification/TestModule/Cest/sampleSuiteCest.xml rename to dev/tests/verification/TestModule/Cest/SampleSuiteCest.xml index 9f09a9eee..712fe2636 100644 --- a/dev/tests/verification/TestModule/Cest/sampleSuiteCest.xml +++ b/dev/tests/verification/TestModule/Cest/SampleSuiteCest.xml @@ -8,21 +8,21 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <cest name="sampleSuiteCest"> - <test name="includeTest"> + <cest name="SampleSuiteCest"> + <test name="IncludeTest"> <amOnPage mergeKey="testOnPage" url="/someUrl"/> <see mergeKey="seeThePage" selector=".someSelector"/> <click mergeKey="clickOnSomething" selector=".clickable"/> <fillField mergeKey="fillAField" selector=".fillable"/> </test> - <test name="excludeTest"> + <test name="ExcludeTest"> <amOnPage mergeKey="testOnPage" url="/someUrl"/> <see mergeKey="seeThePage" selector=".someSelector"/> <click mergeKey="clickOnSomething" selector=".clickable"/> <fillField mergeKey="fillAField" selector=".fillable"/> </test> </cest> - <cest name="sampleSuite2Cest"> + <cest name="SampleSuite2Cest"> <annotations> <group value="exclude"/> </annotations> @@ -33,8 +33,8 @@ <fillField mergeKey="fillAField" selector=".fillable"/> </test> </cest> - <cest name="sampleSuite3Cest"> - <test name="includeTest"> + <cest name="SampleSuite3Cest"> + <test name="IncludeTest"> <annotations> <group value="include"/> </annotations> @@ -50,7 +50,7 @@ <fillField mergeKey="fillAField" selector=".fillable"/> </test> </cest> - <cest name="sampleSuite4Cest"> + <cest name="SampleSuite4Cest"> <test name="additionalTest"> <annotations> <group value="exclude"/> @@ -60,14 +60,14 @@ <click mergeKey="clickOnSomething" selector=".clickable"/> <fillField mergeKey="fillAField" selector=".fillable"/> </test> - <test name="includeTest"> + <test name="IncludeTest"> <amOnPage mergeKey="testOnPage" url="/someUrl"/> <see mergeKey="seeThePage" selector=".someSelector"/> <click mergeKey="clickOnSomething" selector=".clickable"/> <fillField mergeKey="fillAField" selector=".fillable"/> </test> </cest> - <cest name="sampleSuite5Cest"> + <cest name="SampleSuite5Cest"> <annotations> <group value="include"/> </annotations> @@ -77,11 +77,11 @@ <click mergeKey="clickOnSomething" selector=".clickable"/> <fillField mergeKey="fillAField" selector=".fillable"/> </test> - <test name="excludeTest"> + <test name="ExcludeTest"> <amOnPage mergeKey="testOnPage" url="/someUrl"/> <see mergeKey="seeThePage" selector=".someSelector"/> <click mergeKey="clickOnSomething" selector=".clickable"/> <fillField mergeKey="fillAField" selector=".fillable"/> </test> </cest> -</config> \ No newline at end of file +</config> diff --git a/dev/tests/verification/TestModule/Cest/basicFunctionalCest.xml b/dev/tests/verification/TestModule/Cest/basicFunctionalCest.xml index 33036f3eb..28578bd44 100644 --- a/dev/tests/verification/TestModule/Cest/basicFunctionalCest.xml +++ b/dev/tests/verification/TestModule/Cest/basicFunctionalCest.xml @@ -74,7 +74,10 @@ <moveMouseOver selector=".functionalTestSelector" mergeKey="moveMouseOverKey1"/> <openNewTab mergeKey="openNewTabKey1"/> <pauseExecution mergeKey="pauseExecutionKey1"/> - <pressKey selector=".functionalTestSelector" mergeKey="pressKeyKey1"/> + <pressKey selector="#page" userInput="a" mergeKey="pressKey1"/> + <pressKey selector="#page" parameterArray="[['ctrl','a'],'new']" mergeKey="pressKey2"/> + <pressKey selector="#page" parameterArray="[['shift','111'],'1','x']" mergeKey="pressKey3"/> + <pressKey selector="#page" parameterArray="[['ctrl', 'a'], \Facebook\WebDriver\WebDriverKeys::DELETE]" mergeKey="pressKey4"/> <reloadPage mergeKey="reloadPageKey1"/> <resetCookie userInput="cookieInput" mergeKey="resetCookieKey1"/> <resizeWindow width="0" height="0" mergeKey="resizeWindowKey1" /> diff --git a/dev/tests/verification/TestModule/Data/ParameterArrayData.xml b/dev/tests/verification/TestModule/Data/ParameterArrayData.xml new file mode 100644 index 000000000..45b0c96d2 --- /dev/null +++ b/dev/tests/verification/TestModule/Data/ParameterArrayData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="simpleParamData" type="data"> + <data key="name">name</data> + <data key="uniqueNamePre" unique="prefix">prename</data> + <data key="uniqueNamePost" unique="suffix">postname</data> + </entity> +</config> diff --git a/dev/tests/verification/TestModule/Data/persistedReplacementData.xml b/dev/tests/verification/TestModule/Data/PersistedReplacementData.xml similarity index 64% rename from dev/tests/verification/TestModule/Data/persistedReplacementData.xml rename to dev/tests/verification/TestModule/Data/PersistedReplacementData.xml index faec18687..fba2be632 100644 --- a/dev/tests/verification/TestModule/Data/persistedReplacementData.xml +++ b/dev/tests/verification/TestModule/Data/PersistedReplacementData.xml @@ -9,12 +9,17 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="replacementPerson" type="samplePerson"> + <entity name="ReplacementPerson" type="samplePerson"> <data key="firstname">John</data> <data key="lastName">Doe</data> </entity> - <entity name="uniquePerson" type="samplePerson"> + <entity name="UniquePerson" type="samplePerson"> <data key="firstname" unique="suffix">John</data> <data key="lastName">Doe</data> </entity> + <entity name="DefaultPerson" type="samplePerson"> + <data key="firstname">Jane</data> + <data key="lastName">Dane</data> + <data key="mergedField">unmerged</data> + </entity> </config> diff --git a/dev/tests/verification/TestModule/Data/PersistedReplacementMergeData.xml b/dev/tests/verification/TestModule/Data/PersistedReplacementMergeData.xml new file mode 100644 index 000000000..aa1893b40 --- /dev/null +++ b/dev/tests/verification/TestModule/Data/PersistedReplacementMergeData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="DefaultPerson" type="samplePerson"> + <data key="mergedField">merged</data> + <data key="newField">newField</data> + </entity> +</config> diff --git a/dev/tests/verification/TestModule/Data/placeholder.txt b/dev/tests/verification/TestModule/Data/placeholder.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/dev/tests/verification/TestModule/Page/SamplePage.xml b/dev/tests/verification/TestModule/Page/SamplePage.xml index 034e0dd50..02eca33c9 100644 --- a/dev/tests/verification/TestModule/Page/SamplePage.xml +++ b/dev/tests/verification/TestModule/Page/SamplePage.xml @@ -7,8 +7,8 @@ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="SamplePage" urlPath="/{{var1}}/{{var2}}.html" module="SampleTests" parameterized="true"> + xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="SamplePage" url="/{{var1}}/{{var2}}.html" module="SampleTests" parameterized="true"> <section name="SampleSection"/> </page> </config> diff --git a/dev/tests/verification/TestModule/Page/placeholder.txt b/dev/tests/verification/TestModule/Page/placeholder.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/dev/tests/verification/TestModule/Section/SampleSection.xml b/dev/tests/verification/TestModule/Section/SampleSection.xml index 789e8dfd3..211af228d 100644 --- a/dev/tests/verification/TestModule/Section/SampleSection.xml +++ b/dev/tests/verification/TestModule/Section/SampleSection.xml @@ -7,11 +7,12 @@ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="SampleSection"> <element name="oneParamElement" type="button" selector="#element .{{var1}}" parameterized="true"/> <element name="twoParamElement" type="button" selector="#{{var1}} .{{var2}}" parameterized="true"/> <element name="threeParamElement" type="button" selector="#{{var1}}-{{var2}} .{{var3}}" parameterized="true"/> <element name="timeoutElement" type="button" selector="#foo" timeout="30"/> + <element name="mergeElement" type="button" selector="#unMerge"/> </section> </config> diff --git a/dev/tests/verification/TestModule/Section/placeholder.txt b/dev/tests/verification/TestModule/Section/placeholder.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/dev/tests/verification/TestModule/Section/zMergeSection.xml b/dev/tests/verification/TestModule/Section/zMergeSection.xml new file mode 100644 index 000000000..4e04a19fb --- /dev/null +++ b/dev/tests/verification/TestModule/Section/zMergeSection.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="SampleSection"> + <element name="oneParamElement" type="button" selector="#element .{{var1}}" parameterized="true"/> + <element name="twoParamElement" type="button" selector="#{{var1}} .{{var2}}" parameterized="true"/> + <element name="threeParamElement" type="button" selector="#{{var1}}-{{var2}} .{{var3}}" parameterized="true"/> + <element name="timeoutElement" type="button" selector="#foo" timeout="30"/> + <element name="mergeElement" type="select" selector="#merge"/> + <element name="newElement" type="select" selector="#newElement"/> + </section> +</config> diff --git a/dev/tests/verification/Tests/ActionGroupMergeGenerationTest.php b/dev/tests/verification/Tests/ActionGroupMergeGenerationTest.php new file mode 100644 index 000000000..eae2dad70 --- /dev/null +++ b/dev/tests/verification/Tests/ActionGroupMergeGenerationTest.php @@ -0,0 +1,60 @@ +<?php + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace tests\verification\Tests; + +use Magento\FunctionalTestingFramework\Test\Handlers\CestObjectHandler; +use Magento\FunctionalTestingFramework\Util\TestGenerator; +use PHPUnit\Framework\TestCase; + +class ActionGroupMergeGenerationTest extends TestCase +{ + const MERGE_FUNCTIONAL_CEST = 'MergeFunctionalCest'; + const ACTION_GROUP_FUNCTIONAL_CEST = "ActionGroupFunctionalCest"; + const RESOURCES_PATH = __DIR__ . '/../Resources'; + + /** + * Tests flat generation of a hardcoded cest file with no external references. + */ + public function testMergeFunctionalCest() + { + $this->runComparisonTest(self::MERGE_FUNCTIONAL_CEST); + } + + /** + * Test generation of a cest file with action group references. + */ + public function testActionGroupFunctionalCest() + { + $this->runComparisonTest(self::ACTION_GROUP_FUNCTIONAL_CEST); + } + + + /** + * Generate a Cest by name and assert that it equals the corresponding .txt source of truth + * + * @param string $cestName + */ + private function runComparisonTest($cestName) + { + $cest = CestObjectHandler::getInstance()->getObject($cestName); + $test = TestGenerator::getInstance(null, [$cest]); + $test->createAllCestFiles(); + + $cestFile = $test->getExportDir() . + DIRECTORY_SEPARATOR . + $cestName . + ".php"; + + $this->assertTrue(file_exists($cestFile)); + + + $this->assertFileEquals( + self::RESOURCES_PATH . DIRECTORY_SEPARATOR . $cestName . ".txt", + $cestFile + ); + } +} diff --git a/dev/tests/verification/Tests/BasicCestGenerationTest.php b/dev/tests/verification/Tests/BasicCestGenerationTest.php index b53223fce..4c0e2e5e1 100644 --- a/dev/tests/verification/Tests/BasicCestGenerationTest.php +++ b/dev/tests/verification/Tests/BasicCestGenerationTest.php @@ -8,7 +8,6 @@ use Magento\FunctionalTestingFramework\Test\Handlers\CestObjectHandler; use Magento\FunctionalTestingFramework\Util\TestGenerator; use PHPUnit\Framework\TestCase; -use tests\verification\Util\FileDiffUtil; class BasicCestGenerationTest extends TestCase { @@ -31,12 +30,9 @@ public function testBasicGeneration() $this->assertTrue(file_exists($cestFile)); - $fileDiffUtil = new FileDiffUtil( + $this->assertFileEquals( self::RESOURCES_PATH . DIRECTORY_SEPARATOR . self::BASIC_FUNCTIONAL_CEST . ".txt", $cestFile ); - - $diffResult = $fileDiffUtil->diffContents(); - $this->assertNull($diffResult, $diffResult); } } diff --git a/dev/tests/verification/Tests/ParameterArrayTest.php b/dev/tests/verification/Tests/ParameterArrayTest.php new file mode 100644 index 000000000..82c6a2dfb --- /dev/null +++ b/dev/tests/verification/Tests/ParameterArrayTest.php @@ -0,0 +1,38 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace tests\verification\Tests; + +use Magento\FunctionalTestingFramework\Test\Handlers\CestObjectHandler; +use Magento\FunctionalTestingFramework\Util\TestGenerator; +use PHPUnit\Framework\TestCase; + +class ParameterArrayTest extends TestCase +{ + const PARAMETER_ARRAY_CEST = 'ParameterArrayCest'; + const RESOURCES_PATH = __DIR__ . '/../Resources'; + + /** + * Tests flat generation of a hardcoded cest file with no external references. + */ + public function testParameterArrayGeneration() + { + $cest = CestObjectHandler::getInstance()->getObject(self::PARAMETER_ARRAY_CEST); + $test = TestGenerator::getInstance(null, [$cest]); + $test->createAllCestFiles(); + + $cestFile = $test->getExportDir() . + DIRECTORY_SEPARATOR . + self::PARAMETER_ARRAY_CEST . + ".php"; + + $this->assertTrue(file_exists($cestFile)); + + $this->assertFileEquals( + self::RESOURCES_PATH . DIRECTORY_SEPARATOR . self::PARAMETER_ARRAY_CEST . ".txt", + $cestFile + ); + } +} diff --git a/dev/tests/verification/Tests/PersistedReplacementGenerationTest.php b/dev/tests/verification/Tests/PersistedReplacementGenerationTest.php index ab74c7331..b95afc99d 100644 --- a/dev/tests/verification/Tests/PersistedReplacementGenerationTest.php +++ b/dev/tests/verification/Tests/PersistedReplacementGenerationTest.php @@ -8,7 +8,6 @@ use Magento\FunctionalTestingFramework\Test\Handlers\CestObjectHandler; use Magento\FunctionalTestingFramework\Util\TestGenerator; use PHPUnit\Framework\TestCase; -use tests\verification\Util\FileDiffUtil; class PersistedReplacementGenerationTest extends TestCase { @@ -31,12 +30,9 @@ public function testPersistedReplacementGeneration() $this->assertTrue(file_exists($cestFile)); - $fileDiffUtil = new FileDiffUtil( + $this->assertFileEquals( self::RESOURCES_PATH . DIRECTORY_SEPARATOR . self::PERSISTED_REPLACEMENT_CEST . ".txt", $cestFile ); - - $diffResult = $fileDiffUtil->diffContents(); - $this->assertNull($diffResult, $diffResult); } } diff --git a/dev/tests/verification/Tests/SuiteGenerationTest.php b/dev/tests/verification/Tests/SuiteGenerationTest.php index ecba7d5cc..fc34b9af1 100644 --- a/dev/tests/verification/Tests/SuiteGenerationTest.php +++ b/dev/tests/verification/Tests/SuiteGenerationTest.php @@ -10,7 +10,6 @@ use Magento\FunctionalTestingFramework\Util\TestManifest; use PHPUnit\Framework\TestCase; use Symfony\Component\Yaml\Yaml; -use tests\verification\Util\FileDiffUtil; class SuiteGenerationTest extends TestCase { @@ -58,8 +57,7 @@ public function testSuiteGeneration1() DIRECTORY_SEPARATOR . TestManifest::TEST_MANIFEST_FILENAME; $expectedManifest = self::RESOURCES_DIR . DIRECTORY_SEPARATOR . __FUNCTION__ . ".txt"; - $fileDiffUtil = new FileDiffUtil($expectedManifest, $actualManifest); - $this->assertNull($fileDiffUtil->diffContents()); + $this->assertFileEquals($expectedManifest, $actualManifest); } public static function tearDownAfterClass() diff --git a/dev/tests/verification/Util/FileDiffUtil.php b/dev/tests/verification/Util/FileDiffUtil.php deleted file mode 100644 index 0937472a1..000000000 --- a/dev/tests/verification/Util/FileDiffUtil.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace tests\verification\Util; - -class FileDiffUtil -{ - /** - * Object which represents the expected file - * - * @var array|bool - */ - private $expectedFile; - - - /** - * Object which represents the actual file - * - * @var array|bool - */ - private $actualFile; - - /** - * FileDiffUtil constructor. - * - * @param string $expectedFilePath - * @param string $actualFilePath - */ - public function __construct($expectedFilePath, $actualFilePath) - { - $this->expectedFile = file($expectedFilePath); - $this->actualFile = file($actualFilePath); - } - - /** - * Function which does a line by line comparison between the contents of the two files fed to the constructor. - * - * @return null|string - */ - public function diffContents() - { - $differingContent = null; - foreach ($this->actualFile as $line_num => $line) { - if ($line != $this->expectedFile[$line_num]) { - return $this->expectedFile[$line_num] . "was expected, but found: ${line} on line ${line_num}."; - } - } - - return $differingContent; - } -} diff --git a/etc/di.xml b/etc/di.xml index aa24e6e1c..ad5b0db84 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -208,7 +208,7 @@ <item name="/config/cest/test/createData/required-entity" xsi:type="string">createDataKey</item> <item name="/config/cest/test/updateData/required-entity" xsi:type="string">createDataKey</item> <item name="/config/cest/test/getData/required-entity" xsi:type="string">createDataKey</item> - <item name="/config/cest/test/(acceptPopup|actionGroup|amOnPage|amOnUrl|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|click|clickWithLeftButton|clickWithRightButton|closeTab|createData|deleteData|updateData|getData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> + <item name="/config/cest/test/(acceptPopup|actionGroup|amOnPage|amOnUrl|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeTab|comment|createData|deleteData|updateData|getData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> </argument> <argument name="fileName" xsi:type="string">*Cest.xml</argument> <argument name="defaultScope" xsi:type="string">Cest</argument> @@ -218,9 +218,9 @@ <virtualType name="Magento\FunctionalTestingFramework\Test\Config\Dom\ArrayNodeConfig" type="Magento\FunctionalTestingFramework\Config\Dom\ArrayNodeConfig"> <arguments> <argument name="assocArrayAttributes" xsi:type="array"> - <item name="/config/cest/test/(acceptPopup|actionGroup|amOnPage|amOnUrl|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|click|clickWithLeftButton|clickWithRightButton|closeTab|createData|deleteData|updateData|getData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> - <item name="/config/cest/before/(acceptPopup|actionGroup|amOnPage|amOnUrl|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|click|clickWithLeftButton|clickWithRightButton|closeTab|createData|deleteData|updateData|getData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> - <item name="/config/cest/after/(acceptPopup|actionGroup|amOnPage|amOnUrl|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|click|clickWithLeftButton|clickWithRightButton|closeTab|createData|deleteData|updateData|getData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> + <item name="/config/cest/test/(acceptPopup|actionGroup|amOnPage|amOnUrl|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeTab|comment|createData|deleteData|updateData|getData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> + <item name="/config/cest/before/(acceptPopup|actionGroup|amOnPage|amOnUrl|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeTab|comment|createData|deleteData|updateData|getData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> + <item name="/config/cest/after/(acceptPopup|actionGroup|amOnPage|amOnUrl|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeTab|comment|createData|deleteData|updateData|getData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> <item name="/config/cest/test" xsi:type="string">name</item> <item name="/config/cest" xsi:type="string">name</item> <item name="/config/cest/test/createData/required-entity" xsi:type="string">createDataKey</item> @@ -284,7 +284,7 @@ <argument name="idAttributes" xsi:type="array"> <item name="/config/actionGroup" xsi:type="string">name</item> <item name="/config/actionGroup/arguments/argument" xsi:type="string">name</item> - <item name="/config/actionGroup/(acceptPopup|amOnPage|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|click|clickWithLeftButton|clickWithRightButton|closeTab|createData|deleteData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> + <item name="/config/actionGroup/(acceptPopup|amOnPage|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeTab|comment|createData|deleteData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> </argument> <argument name="fileName" xsi:type="string">*ActionGroup.xml</argument> <argument name="defaultScope" xsi:type="string">ActionGroup</argument> @@ -294,7 +294,7 @@ <virtualType name="Magento\FunctionalTestingFramework\Test\Config\Dom\ActionGroupArrayNodeConfig" type="Magento\FunctionalTestingFramework\Config\Dom\ArrayNodeConfig"> <arguments> <argument name="assocArrayAttributes" xsi:type="array"> - <item name="/config/actionGroup/(acceptPopup|amOnPage|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|click|clickWithLeftButton|clickWithRightButton|closeTab|createData|deleteData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> + <item name="/config/actionGroup/(acceptPopup|amOnPage|appendField|assertArraySubset|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeTab|comment|createData|deleteData|dontSee|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|executeJS|fillField|formatMoney|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|openNewTab|pauseExecution|performOn|pressKey|reloadPage|resetCookie|resizeWindow|scrollTo|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForJS|waitForPageLoad|waitForText)" xsi:type="string">mergeKey</item> <item name="/config/actionGroup" xsi:type="string">name</item> <item name="/config/actionGroup/arguments/argument" xsi:type="string">name</item> </argument> diff --git a/src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/DataObjectHandler.php b/src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/DataObjectHandler.php index 6f3987559..0ca3d459a 100644 --- a/src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/DataObjectHandler.php +++ b/src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/DataObjectHandler.php @@ -174,7 +174,7 @@ private function parseDataEntities() if (array_key_exists(self::DATA_VALUES, $entity)) { foreach ($entity[self::DATA_VALUES] as $dataElement) { $dataElementKey = strtolower($dataElement[self::DATA_ELEMENT_KEY]); - $dataElementValue = $dataElement[self::DATA_ELEMENT_VALUE]; + $dataElementValue = $dataElement[self::DATA_ELEMENT_VALUE] ?? ""; if (array_key_exists(self::DATA_ELEMENT_UNIQUENESS_ATTR, $dataElement)) { $uniquenessValues[$dataElementKey] = $dataElement[self::DATA_ELEMENT_UNIQUENESS_ATTR]; } diff --git a/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/CurlHandler.php b/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/CurlHandler.php index a4a574dd2..2504ada77 100644 --- a/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/CurlHandler.php +++ b/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/CurlHandler.php @@ -124,7 +124,8 @@ public function executeRequest($dependentEntities) $this->requestData = $operationDataResolver->resolveOperationDataArray( $this->entityObject, $this->operationDefinition->getOperationMetadata(), - $this->operationDefinition->getOperation() + $this->operationDefinition->getOperation(), + false ); if (($contentType === 'application/json') && ($authorization === 'adminOauth')) { diff --git a/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/DataPersistenceHandler.php b/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/DataPersistenceHandler.php index fe1b1e037..d69595f7c 100644 --- a/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/DataPersistenceHandler.php +++ b/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/DataPersistenceHandler.php @@ -174,7 +174,7 @@ private function setCreatedObject($response, $index, $requestDataArray, $isJson) $responseData = $responseData[$index]; } if (is_array($responseData)) { - $persistedData = array_merge($requestDataArray, $responseData); + $persistedData = $this->convertToFlatArray(array_merge($requestDataArray, $responseData)); } else { $persistedData = $requestDataArray; } diff --git a/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/OperationDataArrayResolver.php b/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/OperationDataArrayResolver.php index 852862640..bbe713c06 100644 --- a/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/OperationDataArrayResolver.php +++ b/src/Magento/FunctionalTestingFramework/DataGenerator/Persist/OperationDataArrayResolver.php @@ -61,10 +61,11 @@ public function __construct($dependentEntities = null) * @param EntityDataObject $entityObject * @param array $operationMetadata * @param string $operation + * @param bool $fromArray * @return array * @throws \Exception */ - public function resolveOperationDataArray($entityObject, $operationMetadata, $operation) + public function resolveOperationDataArray($entityObject, $operationMetadata, $operation, $fromArray = false) { $operationDataArray = []; self::incrementSequence($entityObject->getName()); @@ -72,8 +73,27 @@ public function resolveOperationDataArray($entityObject, $operationMetadata, $op foreach ($operationMetadata as $operationElement) { if ($operationElement->getType() == OperationElementExtractor::OPERATION_OBJECT_OBJ_NAME) { $entityObj = $this->resolveOperationObjectAndEntityData($entityObject, $operationElement->getValue()); - $operationDataArray[$operationElement->getKey()] = - $this->resolveOperationDataArray($entityObj, $operationElement->getNestedMetadata(), $operation); + if (null === $entityObj && $operationElement->getRequired()) { + throw new \Exception(sprintf( + self::EXCEPTION_REQUIRED_DATA, + $operationElement->getType(), + $operationElement->getKey(), + $entityObject->getName() + )); + } elseif (null === $entityObj) { + continue; + } + $operationData = $this->resolveOperationDataArray( + $entityObj, + $operationElement->getNestedMetadata(), + $operation, + $fromArray + ); + if (!$fromArray) { + $operationDataArray[$operationElement->getKey()] = $operationData; + } else { + $operationDataArray = $operationData; + } continue; } @@ -127,7 +147,8 @@ public function resolveOperationDataArray($entityObject, $operationMetadata, $op $operationDataSubArray = $this->resolveNonPrimitiveElement( $entityName, $operationElement, - $operation + $operation, + $fromArray ); if ($operationElement->getType() == OperationDefinitionObjectHandler::ENTITY_OPERATION_ARRAY) { @@ -216,8 +237,12 @@ private function resolveOperationObjectAndEntityData($entityObject, $operationEl { if ($operationElementValue != $entityObject->getType()) { // if we have a mismatch attempt to retrieve linked data and return just the first linkage - $linkName = $entityObject->getLinkedEntitiesOfType($operationElementValue)[0]; - return DataObjectHandler::getInstance()->getObject($linkName); + $linkName = $entityObject->getLinkedEntitiesOfType($operationElementValue); + if (!empty($linkName)) { + $linkName = $linkName[0]; + return DataObjectHandler::getInstance()->getObject($linkName); + } + return null; } return $entityObject; @@ -229,9 +254,10 @@ private function resolveOperationObjectAndEntityData($entityObject, $operationEl * @param string $entityName * @param OperationElement $operationElement * @param string $operation + * @param bool $fromArray * @return array */ - private function resolveNonPrimitiveElement($entityName, $operationElement, $operation) + private function resolveNonPrimitiveElement($entityName, $operationElement, $operation, $fromArray = false) { $linkedEntityObj = $this->resolveLinkedEntityObject($entityName); @@ -242,10 +268,11 @@ private function resolveNonPrimitiveElement($entityName, $operationElement, $ope $operationSubArray = $this->resolveOperationDataArray( $linkedEntityObj, [$operationElement->getNestedOperationElement($operationElement->getValue())], - $operation + $operation, + true ); - return $operationSubArray[$operationElement->getValue()]; + return $operationSubArray; } $operationMetadata = OperationDefinitionObjectHandler::getInstance()->getOperationDefinition( @@ -253,7 +280,7 @@ private function resolveNonPrimitiveElement($entityName, $operationElement, $ope $linkedEntityObj->getType() )->getOperationMetadata(); - return $this->resolveOperationDataArray($linkedEntityObj, $operationMetadata, $operation); + return $this->resolveOperationDataArray($linkedEntityObj, $operationMetadata, $operation, $fromArray); } /** diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index 470db0c50..f2004b1ee 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -235,7 +235,7 @@ public function formatMoney(float $money, $locale = 'en_US.UTF-8') /** * Parse float number with thousands_sep. * - * @param $floatString + * @param string $floatString * @return float */ public function parseFloat($floatString){ @@ -283,8 +283,9 @@ public function scrollToTopOfPage() * Conditional click for an area that should be visible * * @param string $selector - * @param string dependentSelector + * @param string $dependentSelector * @param bool $visible + * @throws \Exception */ public function conditionalClick($selector, $dependentSelector, $visible) { @@ -305,6 +306,16 @@ public function conditionalClick($selector, $dependentSelector, $visible) } } + /** + * Clear the given Text Field or Textarea + * + * @param string $selector + */ + public function clearField($selector) + { + $this->fillField($selector, ""); + } + /** * Override for _failed method in Codeception method. Adds png and html attachments to allure report * following parent execution of test failure processing. diff --git a/src/Magento/FunctionalTestingFramework/Page/Handlers/PageObjectHandler.php b/src/Magento/FunctionalTestingFramework/Page/Handlers/PageObjectHandler.php index b13ae5c7b..928911150 100644 --- a/src/Magento/FunctionalTestingFramework/Page/Handlers/PageObjectHandler.php +++ b/src/Magento/FunctionalTestingFramework/Page/Handlers/PageObjectHandler.php @@ -18,8 +18,8 @@ class PageObjectHandler implements ObjectHandlerInterface { const TYPE = 'page'; const SUB_TYPE = 'section'; - const URL_PATH_ATTR = 'urlPath'; - const MODULE_ATTR = 'module'; + const URL = 'url'; + const MODULE = 'module'; const PARAMETERIZED = 'parameterized'; /** @@ -102,12 +102,12 @@ private function initPageObjects() } foreach ($parsedObjs as $pageName => $pageData) { - $urlPath = $pageData[PageObjectHandler::URL_PATH_ATTR]; - $module = $pageData[PageObjectHandler::MODULE_ATTR]; - $sections = array_keys($pageData[PageObjectHandler::SUB_TYPE]); - $parameterized = $pageData[PageObjectHandler::PARAMETERIZED] ?? false; + $url = $pageData[self::URL]; + $module = $pageData[self::MODULE]; + $sections = array_keys($pageData[self::SUB_TYPE]); + $parameterized = $pageData[self::PARAMETERIZED] ?? false; - $this->pages[$pageName] = new PageObject($pageName, $urlPath, $module, $sections, $parameterized); + $this->pages[$pageName] = new PageObject($pageName, $url, $module, $sections, $parameterized); } } } diff --git a/src/Magento/FunctionalTestingFramework/Page/Objects/PageObject.php b/src/Magento/FunctionalTestingFramework/Page/Objects/PageObject.php index 7a08b2714..79bfbcd58 100644 --- a/src/Magento/FunctionalTestingFramework/Page/Objects/PageObject.php +++ b/src/Magento/FunctionalTestingFramework/Page/Objects/PageObject.php @@ -52,15 +52,15 @@ class PageObject /** * PageObject constructor. * @param string $name - * @param string $urlPath + * @param string $url * @param string $module * @param array $sections * @param bool $parameterized */ - public function __construct($name, $urlPath, $module, $sections, $parameterized) + public function __construct($name, $url, $module, $sections, $parameterized) { $this->name = $name; - $this->url = $urlPath; + $this->url = $url; $this->module = $module; $this->sectionNames = $sections; $this->parameterized = $parameterized; diff --git a/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd b/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd index 631b40531..b862cd364 100644 --- a/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd +++ b/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd @@ -48,10 +48,10 @@ </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute type="notEmptyType" name="urlPath" use="required"> + <xs:attribute type="notEmptyType" name="url" use="required"> <xs:annotation> <xs:documentation> - Url path (excluding the base url) for the page. Use "%s" for placeholders for variables. + URL for the page. Do not include the hostname. For example: "/admin/customer/index/" </xs:documentation> </xs:annotation> </xs:attribute> diff --git a/src/Magento/FunctionalTestingFramework/Suite/Util/SuiteObjectExtractor.php b/src/Magento/FunctionalTestingFramework/Suite/Util/SuiteObjectExtractor.php index 04135c867..ddb6f8446 100644 --- a/src/Magento/FunctionalTestingFramework/Suite/Util/SuiteObjectExtractor.php +++ b/src/Magento/FunctionalTestingFramework/Suite/Util/SuiteObjectExtractor.php @@ -68,12 +68,14 @@ public function parseSuiteDataIntoObjects($parsedSuiteData) // parse any object hooks if (array_key_exists(CestObjectExtractor::CEST_BEFORE_HOOK, $parsedSuite)) { $suiteHooks[CestObjectExtractor::CEST_BEFORE_HOOK] = $cestObjectHookExtractor->extractHook( + $parsedSuite[self::NAME], CestObjectExtractor::CEST_BEFORE_HOOK, $parsedSuite[CestObjectExtractor::CEST_BEFORE_HOOK] ); } if (array_key_exists(CestObjectExtractor::CEST_AFTER_HOOK, $parsedSuite)) { $suiteHooks[CestObjectExtractor::CEST_AFTER_HOOK] = $cestObjectHookExtractor->extractHook( + $parsedSuite[self::NAME], CestObjectExtractor::CEST_AFTER_HOOK, $parsedSuite[CestObjectExtractor::CEST_AFTER_HOOK] ); diff --git a/src/Magento/FunctionalTestingFramework/Suite/etc/sampleSuite.xml b/src/Magento/FunctionalTestingFramework/Suite/etc/sampleSuite.xml index 7a120b3e2..20adfae57 100644 --- a/src/Magento/FunctionalTestingFramework/Suite/etc/sampleSuite.xml +++ b/src/Magento/FunctionalTestingFramework/Suite/etc/sampleSuite.xml @@ -15,7 +15,7 @@ </include> <exclude> <group name="someGroup"/> - <cest name="excludeTest" test=""/> + <cest name="ExcludeTest" test=""/> <group name="excludeGroup"/> <module name="moduleName" file="excludeFile"/> </exclude> diff --git a/src/Magento/FunctionalTestingFramework/Test/Config/Converter/Dom/Flat.php b/src/Magento/FunctionalTestingFramework/Test/Config/Converter/Dom/Flat.php index e08174604..b00aaa6ed 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Config/Converter/Dom/Flat.php +++ b/src/Magento/FunctionalTestingFramework/Test/Config/Converter/Dom/Flat.php @@ -70,7 +70,7 @@ public function convertXml(\DOMNode $source, $basePath = '') $value = []; /** @var \DOMNode $node */ foreach ($source->childNodes as $node) { - if ($node->nodeType == XML_ELEMENT_NODE) { + if ($node->nodeType == XML_ELEMENT_NODE && $node->getAttribute('remove') != 'true') { $nodeName = $node->nodeName; $nodePath = $basePath . '/' . $nodeName; diff --git a/src/Magento/FunctionalTestingFramework/Test/Handlers/ActionGroupObjectHandler.php b/src/Magento/FunctionalTestingFramework/Test/Handlers/ActionGroupObjectHandler.php index 7ba2b4cbb..cb5f6df78 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Handlers/ActionGroupObjectHandler.php +++ b/src/Magento/FunctionalTestingFramework/Test/Handlers/ActionGroupObjectHandler.php @@ -66,7 +66,11 @@ private function __construct() */ public function getObject($actionGroupName) { - return $this->getAllObjects()[$actionGroupName]; + if (array_key_exists($actionGroupName, $this->getAllObjects())) { + return $this->getAllObjects()[$actionGroupName]; + } + + return null; } /** diff --git a/src/Magento/FunctionalTestingFramework/Test/Objects/ActionGroupObject.php b/src/Magento/FunctionalTestingFramework/Test/Objects/ActionGroupObject.php index 58d832c43..11c0f05df 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Objects/ActionGroupObject.php +++ b/src/Magento/FunctionalTestingFramework/Test/Objects/ActionGroupObject.php @@ -13,7 +13,11 @@ */ class ActionGroupObject { - const VAR_ATTRIBUTES = ['userInput', 'selector', 'page', 'url']; + /** + * Array of variable-enabled attributes. + * @var array + */ + private $varAttributes; /** * The name of the action group @@ -45,6 +49,11 @@ class ActionGroupObject */ public function __construct($name, $arguments, $actions) { + $this->varAttributes = array_merge( + ActionObject::SELECTOR_ENABLED_ATTRIBUTES, + ActionObject::DATA_ENABLED_ATTRIBUTES + ); + $this->varAttributes[] = ActionObject::ACTION_ATTRIBUTE_URL; $this->name = $name; $this->arguments = $arguments; $this->parsedActions = $actions; @@ -59,7 +68,7 @@ public function __construct($name, $arguments, $actions) */ public function getSteps($arguments, $actionReferenceKey) { - $mergeUtil = new ActionMergeUtil(); + $mergeUtil = new ActionMergeUtil($this->name, "ActionGroup"); $args = $this->arguments; if ($arguments) { @@ -84,23 +93,23 @@ private function getResolvedActionsWithArgs($arguments, $actionReferenceKey) // $regexPattern match on: $matches[0] {{section.element(arg.field)}} // $matches[1] = section.element // $matches[2] = arg.field - $regexPattern = '/{{([\w.\[\]]+)\(*([\w.$\']+)*\)*}}/'; + $regexPattern = '/{{([\w.\[\]]+)\(*([\w.$\',\s]+)*\)*}}/'; foreach ($this->parsedActions as $action) { - $varAttributes = array_intersect(self::VAR_ATTRIBUTES, array_keys($action->getCustomActionAttributes())); + $varAttributes = array_intersect($this->varAttributes, array_keys($action->getCustomActionAttributes())); $newActionAttributes = []; + if (!empty($varAttributes)) { // 1 check to see if we have pertinent var foreach ($varAttributes as $varAttribute) { $attributeValue = $action->getCustomActionAttributes()[$varAttribute]; preg_match_all($regexPattern, $attributeValue, $matches); - if (empty($matches[0])) { continue; } //get rid of full match {{arg.field(arg.field)}} - unset($matches[0]); + array_shift($matches); $newActionAttributes[$varAttribute] = $this->replaceAttributeArguments( $arguments, @@ -109,11 +118,14 @@ private function getResolvedActionsWithArgs($arguments, $actionReferenceKey) ); } } + + // we append the action reference key to any linked action and the action's merge key as the user might + // use this action group multiple times in the same test. $resolvedActions[$action->getMergeKey() . $actionReferenceKey] = new ActionObject( $action->getMergeKey() . $actionReferenceKey, $action->getType(), array_merge($action->getCustomActionAttributes(), $newActionAttributes), - $action->getLinkedAction(), + $action->getLinkedAction() == null ? null : $action->getLinkedAction() . $actionReferenceKey, $action->getOrderOffset() ); } @@ -132,36 +144,68 @@ private function getResolvedActionsWithArgs($arguments, $actionReferenceKey) */ private function replaceAttributeArguments($arguments, $attributeValue, $matches) { - $matchParametersKey = 2; - $newAttributeVal = $attributeValue; + list($mainValueList, $possibleArgumentsList) = $matches; - foreach ($matches as $key => $match) { - foreach ($match as $variable) { - if (empty($variable)) { - continue; - } - // Truncate arg.field into arg. If 'Literal' was passed, variableName will be null. - $variableName = strstr($variable, '.', true); - // Check if arguments has a mapping for the given variableName - if ($variableName == null || !array_key_exists($variableName, $arguments)) { - continue; - } - $isPersisted = strstr($arguments[$variableName], '$'); - if ($isPersisted) { - $newAttributeVal = $this->replacePersistedArgument( - $arguments[$variableName], - $attributeValue, - $variable, - $variableName, - $key == $matchParametersKey ? true : false - ); - } else { - $newAttributeVal = str_replace($variableName, $arguments[$variableName], $attributeValue); - } + foreach ($mainValueList as $index => $mainValue) { + $possibleArguments = $possibleArgumentsList[$index]; + + $attributeValue = $this->replaceAttributeArgumentInVariable($mainValue, $arguments, $attributeValue); + + // Split on commas, trim all values, and finally filter out all FALSE values + $argumentList = array_filter(array_map('trim', explode(',', $possibleArguments))); + + foreach ($argumentList as $argumentValue) { + $attributeValue = $this->replaceAttributeArgumentInVariable( + $argumentValue, + $arguments, + $attributeValue, + true + ); } } - return $newAttributeVal; + return $attributeValue; + } + + /** + * Replace attribute arguments in variable. + * + * @param string $variable + * @param array $arguments + * @param string $attributeValue + * @param bool $isInnerArgument + * @return string + */ + private function replaceAttributeArgumentInVariable( + $variable, + $arguments, + $attributeValue, + $isInnerArgument = false + ) { + // Truncate arg.field into arg + $variableName = strstr($variable, '.', true); + // Check if arguments has a mapping for the given variableName + + if ($variableName === false) { + $variableName = $variable; + } + + if (!array_key_exists($variableName, $arguments)) { + return $attributeValue; + } + + $isPersisted = strstr($arguments[$variableName], '$'); + if ($isPersisted) { + return $this->replacePersistedArgument( + $arguments[$variableName], + $attributeValue, + $variable, + $variableName, + $isInnerArgument + ); + } + + return str_replace($variableName, $arguments[$variableName], $attributeValue); } /** @@ -188,11 +232,12 @@ private function replacePersistedArgument($replacement, $attributeValue, $fullVa // parameter replacements require changing of (arg.field) to ($arg.field$) if ($isParameter) { - $newAttributeValue = str_replace($fullVariable, $scope . $fullVariable . $scope, $newAttributeValue); + $fullReplacement = str_replace($variable, trim($replacement, '$'), $fullVariable); + $newAttributeValue = str_replace($fullVariable, $scope . $fullReplacement . $scope, $newAttributeValue); } else { $newAttributeValue = str_replace('{{', $scope, str_replace('}}', $scope, $newAttributeValue)); + $newAttributeValue = str_replace($variable, trim($replacement, '$'), $newAttributeValue); } - $newAttributeValue = str_replace($variable, trim($replacement, '$'), $newAttributeValue); return $newAttributeValue; } diff --git a/src/Magento/FunctionalTestingFramework/Test/Objects/CestHookObject.php b/src/Magento/FunctionalTestingFramework/Test/Objects/CestHookObject.php index 7d62b32ec..32f77e3ae 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Objects/CestHookObject.php +++ b/src/Magento/FunctionalTestingFramework/Test/Objects/CestHookObject.php @@ -20,6 +20,13 @@ class CestHookObject */ private $type; + /** + * Name of parent object + * + * @var string + */ + private $parentName; + /** * Array which contains the action objects to be executed in a hook. * @@ -36,12 +43,14 @@ class CestHookObject /** * CestHookObject constructor. * @param string $type + * @param string $parentName * @param array $actions * @param array $customData */ - public function __construct($type, $actions, $customData = null) + public function __construct($type, $parentName, $actions, $customData = null) { $this->type = $type; + $this->cestNameparent = $parentName; $this->actions = $actions; $this->customData = $customData; } @@ -63,7 +72,7 @@ public function getType() */ public function getActions() { - $mergeUtil = new ActionMergeUtil(); + $mergeUtil = new ActionMergeUtil($this->parentName, $this->getType()); return $mergeUtil->resolveActionSteps($this->actions); } diff --git a/src/Magento/FunctionalTestingFramework/Test/Objects/TestObject.php b/src/Magento/FunctionalTestingFramework/Test/Objects/TestObject.php index 6ccf23172..a45861d00 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Objects/TestObject.php +++ b/src/Magento/FunctionalTestingFramework/Test/Objects/TestObject.php @@ -109,7 +109,7 @@ public function getCustomData() */ public function getOrderedActions() { - $mergeUtil = new ActionMergeUtil(); + $mergeUtil = new ActionMergeUtil($this->getName(), "Test"); return $mergeUtil->resolveActionSteps($this->parsedSteps); } } diff --git a/src/Magento/FunctionalTestingFramework/Test/Util/ActionMergeUtil.php b/src/Magento/FunctionalTestingFramework/Test/Util/ActionMergeUtil.php index 391674650..e1035a867 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Util/ActionMergeUtil.php +++ b/src/Magento/FunctionalTestingFramework/Test/Util/ActionMergeUtil.php @@ -6,6 +6,7 @@ namespace Magento\FunctionalTestingFramework\Test\Util; +use Magento\FunctionalTestingFramework\Exceptions\TestReferenceException; use Magento\FunctionalTestingFramework\Exceptions\XmlException; use Magento\FunctionalTestingFramework\Test\Handlers\ActionGroupObjectHandler; use Magento\FunctionalTestingFramework\Test\Objects\ActionObject; @@ -17,7 +18,7 @@ class ActionMergeUtil { const STEP_MISSING_ERROR_MSG = "Merge Error - Step could not be found in either TestXML or DeltaXML. - \tTest = '%s'\tTestStep='%s'\tLinkedStep'%s'"; + \t%s = '%s'\tTestStep='%s'\tLinkedStep'%s'"; const WAIT_ATTR = 'timeout'; const WAIT_ACTION_NAME = 'waitForPageLoad'; @@ -38,12 +39,30 @@ class ActionMergeUtil */ private $stepsToMerge = []; + /** + * Name of calling context. + * + * @var string + */ + private $name; + + /** + * Type of calling context. + * + * @var string + */ + private $type; + /** * ActionMergeUtil constructor. + * + * @param string $contextName + * @param string $contextType */ - public function __construct() + public function __construct($contextName, $contextType) { - // empty constructor + $this->name = $contextName; + $this->type = $contextType; } /** @@ -69,6 +88,7 @@ public function resolveActionSteps($parsedSteps, $skipActionGroupResolution = fa * Method to resolve action group references and insert relevant actions into step flow * * @param array $mergedSteps + * @throws TestReferenceException * @return array */ private function resolveActionGroups($mergedSteps) @@ -78,9 +98,11 @@ private function resolveActionGroups($mergedSteps) foreach ($mergedSteps as $key => $mergedStep) { /**@var ActionObject $mergedStep**/ if ($mergedStep->getType() == ActionObjectExtractor::ACTION_GROUP_TAG) { - $actionGroup = ActionGroupObjectHandler::getInstance()->getObject( - $mergedStep->getCustomActionAttributes()[ActionObjectExtractor::ACTION_GROUP_REF] - ); + $actionGroupRef = $mergedStep->getCustomActionAttributes()[ActionObjectExtractor::ACTION_GROUP_REF]; + $actionGroup = ActionGroupObjectHandler::getInstance()->getObject($actionGroupRef); + if ($actionGroup == null) { + throw new TestReferenceException("Could not find ActionGroup by ref \"{$actionGroupRef}\""); + } $args = $mergedStep->getCustomActionAttributes()[ActionObjectExtractor::ACTION_GROUP_ARGUMENTS] ?? null; $actionsToMerge = $actionGroup->getSteps($args, $key); $newOrderedList = $newOrderedList + $actionsToMerge; @@ -168,7 +190,8 @@ private function mergeAction($stepToMerge) !array_key_exists($linkedStep, $this->stepsToMerge)) { throw new XmlException(sprintf( self::STEP_MISSING_ERROR_MSG, - $this->getName(), + $this->type, + $this->name, $stepToMerge->getMergeKey(), $linkedStep )); diff --git a/src/Magento/FunctionalTestingFramework/Test/Util/ActionObjectExtractor.php b/src/Magento/FunctionalTestingFramework/Test/Util/ActionObjectExtractor.php index 4f75f5db8..b137102e4 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Util/ActionObjectExtractor.php +++ b/src/Magento/FunctionalTestingFramework/Test/Util/ActionObjectExtractor.php @@ -107,7 +107,7 @@ private function processActionGroupArgs($actionAttributeData) } $actionAttributeArgData[self::ACTION_GROUP_ARGUMENTS][$attributeDataKey] = - $attributeDataValues[self::ACTION_GROUP_ARG_VALUE]; + $attributeDataValues[self::ACTION_GROUP_ARG_VALUE] ?? null; } return $actionAttributeArgData; diff --git a/src/Magento/FunctionalTestingFramework/Test/Util/CestHookObjectExtractor.php b/src/Magento/FunctionalTestingFramework/Test/Util/CestHookObjectExtractor.php index 47fb15fe5..0c172656a 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Util/CestHookObjectExtractor.php +++ b/src/Magento/FunctionalTestingFramework/Test/Util/CestHookObjectExtractor.php @@ -40,11 +40,12 @@ public function __construct() * This method trims all irrelevant tags to extract hook information including before and after tags * and their relevant actions. The result is an array of CestHookObjects. * + * @param string $parentName * @param string $hookType * @param array $cestHook * @return CestHookObject */ - public function extractHook($hookType, $cestHook) + public function extractHook($parentName, $hookType, $cestHook) { $hookActions = $this->stripDescriptorTags( $cestHook, @@ -53,6 +54,7 @@ public function extractHook($hookType, $cestHook) $hook = new CestHookObject( $hookType, + $parentName, $this->actionObjectExtractor->extractActions($hookActions), $this->testEntityExtractor->extractTestEntities($hookActions) ); diff --git a/src/Magento/FunctionalTestingFramework/Test/Util/CestObjectExtractor.php b/src/Magento/FunctionalTestingFramework/Test/Util/CestObjectExtractor.php index 7582d520e..445e9c642 100644 --- a/src/Magento/FunctionalTestingFramework/Test/Util/CestObjectExtractor.php +++ b/src/Magento/FunctionalTestingFramework/Test/Util/CestObjectExtractor.php @@ -50,6 +50,7 @@ public function extractCest($cestData) if (array_key_exists(self::CEST_BEFORE_HOOK, $cestData)) { $hooks[self::CEST_BEFORE_HOOK] = $cestHookObjectExtractor->extractHook( + $cestData[self::NAME], self::CEST_BEFORE_HOOK, $cestData[self::CEST_BEFORE_HOOK] ); @@ -59,6 +60,7 @@ public function extractCest($cestData) if (array_key_exists(self::CEST_AFTER_HOOK, $cestData)) { $hooks[self::CEST_AFTER_HOOK] = $cestHookObjectExtractor->extractHook( + $cestData[self::NAME], self::CEST_AFTER_HOOK, $cestData[self::CEST_AFTER_HOOK] ); diff --git a/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd b/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd index 3a31fe992..d6cd059b3 100644 --- a/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd +++ b/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd @@ -86,11 +86,13 @@ <xs:element type="attachFileType" name="attachFile" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="cancelPopupType" name="cancelPopup" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="checkOptionType" name="checkOption" minOccurs="0" maxOccurs="unbounded"/> + <xs:element type="clearFieldType" name="clearField" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="clickType" name="click" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="clickWithLeftButtonType" name="clickWithLeftButton" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="clickWithRightButtonType" name="clickWithRightButton" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="closeAdminNotificationType" name="closeAdminNotification" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="closeTabType" name="closeTab" minOccurs="0" maxOccurs="unbounded"/> + <xs:element type="commentType" name="comment" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="conditionalClickType" name="conditionalClick" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="updateDataType" name="updateData" minOccurs="0" maxOccurs="unbounded"/> <xs:element type="getDataType" name="getData" minOccurs="0" maxOccurs="unbounded"/> @@ -304,6 +306,17 @@ </xs:extension> </xs:simpleContent> </xs:complexType> + <xs:complexType name="clearFieldType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="selector"/> + <xs:attribute type="xs:string" name="mergeKey" use="required"/> + <xs:attribute type="xs:boolean" name="remove" default="false"/> + <xs:attribute type="xs:string" name="before"/> + <xs:attribute type="xs:string" name="after"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> <xs:complexType name="clickType"> <xs:simpleContent> <xs:extension base="xs:string"> @@ -366,6 +379,17 @@ </xs:extension> </xs:simpleContent> </xs:complexType> + <xs:complexType name="commentType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="userInput"/> + <xs:attribute type="xs:string" name="mergeKey" use="required"/> + <xs:attribute type="xs:boolean" name="remove" default="false"/> + <xs:attribute type="xs:string" name="before"/> + <xs:attribute type="xs:string" name="after"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> <xs:complexType name="conditionalClickType"> <xs:simpleContent> <xs:extension base="xs:string"> diff --git a/src/Magento/FunctionalTestingFramework/Util/Filesystem/DirSetupUtil.php b/src/Magento/FunctionalTestingFramework/Util/Filesystem/DirSetupUtil.php index 405b2a4f7..32c03966e 100644 --- a/src/Magento/FunctionalTestingFramework/Util/Filesystem/DirSetupUtil.php +++ b/src/Magento/FunctionalTestingFramework/Util/Filesystem/DirSetupUtil.php @@ -32,7 +32,7 @@ public static function createGroupDir($fullPath) * @param string $directory * @return void */ - private static function rmdirRecursive($directory) + public static function rmdirRecursive($directory) { $it = new RecursiveDirectoryIterator($directory, FilesystemIterator::SKIP_DOTS); diff --git a/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/MetadataGenUtil.php b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/MetadataGenUtil.php new file mode 100644 index 000000000..c0de1827e --- /dev/null +++ b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/MetadataGenUtil.php @@ -0,0 +1,170 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\FunctionalTestingFramework\Util\MetadataGenerator; + +use Mustache_Engine; +use Mustache_Loader_FilesystemLoader; + +class MetadataGenUtil +{ + const OUTPUT_DIR = '_output'; + const INPUT_TXT_FILE = 'input.yml'; + + /** + * Mustache Engine instance for the templating. + * + * @var Mustache_Engine + */ + private $mustacheEngine; + + /** + * Name of the operation (e.g. createCategory) + * + * @var string + */ + private $operationName; + + /** + * Data type of the operation (e.g. category) + * + * @var string + */ + private $operationDataType; + + /** + * Url path for the operation (e.g. /admin/system_config/save/section/payment) + * + * @var string + */ + private $operationUrl; + + /** + * The raw parameter data to be converted into metadata + * (e.g. entity[param1]=value1&entity[param2]=value2&entity[param3]=value3&entityField=field1) + * + * @var string + */ + private $inputString; + + /** + * The relative filepath for the *meta.xml file to be generated. + * + * @var string + */ + private $filepath; + + /** + * MetadataGenUtil constructor. + * + * @param string $operationName + * @param string $operationDataType + * @param string $operationUrl + * @param string $inputString + */ + public function __construct($operationName, $operationDataType, $operationUrl, $inputString) + { + $this->operationName = $operationName; + $this->operationDataType = $operationDataType; + $this->operationUrl = $operationUrl; + $this->inputString = $inputString; + + $this->filepath = self::OUTPUT_DIR . DIRECTORY_SEPARATOR . $this->operationDataType . "-meta.xml"; + } + + /** + * Function which takes params from constructor, transforms into data array and outputs a representative metadata + * file for MFTF to consume and send requests. + * + * @return void + */ + public function generateMetadataFile() + { + // Load Mustache templates + $this->mustacheEngine = new Mustache_Engine( + ['loader' => new Mustache_Loader_FilesystemLoader("views"), + 'partials_loader' => new Mustache_Loader_FilesystemLoader( + "views" . DIRECTORY_SEPARATOR . "partials" + )] + ); + + // parse the string params into an array + parse_str($this->inputString, $results); + $data = $this->convertResultToEntry($results, $this->operationDataType); + $data = $this->appendParentParams($data); + $output = $this->mustacheEngine->render('operation', $data); + $this->cleanAndCreateOutputDir(); + file_put_contents( + $this->filepath, + $output + ); + } + + /** + * Function which takes the top level params from the user and returns an array appended with the needed config. + * + * @param array $data + * @return array + */ + private function appendParentParams($data) + { + $result = $data; + $result['operationName'] = $this->operationName; + $result['operationDataType'] = $this->operationDataType; + $result['operationUrl'] = $this->operationUrl; + + return $result; + } + + /** + * Function which is called recursively to generate the mustache array for the template enging. Makes decisions + * about type and format based on parameter array. + * + * @param array $results + * @param string $defaultDataType + * @return array + */ + private function convertResultToEntry($results, $defaultDataType) + { + $data = []; + + foreach ($results as $key => $result) { + $entry = []; + if (is_array($result)) { + $entry = array_merge($entry, ['objectName' => $key]); + $res = $this->convertResultToEntry($result, $defaultDataType); + if (!array_key_exists('objects', $res)) { + $entry = array_merge($entry, ['objects' => null]); + $entry = array_merge($entry, ['dataType' => $key]); + } else { + $entry = array_merge($entry, ['hasChildObj' => true]); + $entry = array_merge($entry, ['dataType' => $defaultDataType]); + } + $data['objects'][] = array_merge($entry, $res); + } else { + $data['fields'][] = ['fieldName' => $key]; + } + } + + return $data; + } + + /** + * Function which cleans any previously created fileand creates the _output dir. + * + * @return void + */ + private function cleanAndCreateOutputDir() + { + if (!file_exists(self::OUTPUT_DIR)) { + mkdir(self::OUTPUT_DIR); + } + + if (file_exists($this->filepath)) { + unlink($this->filepath); + } + } +} diff --git a/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/_generateMetadtataFile.php b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/_generateMetadtataFile.php new file mode 100644 index 000000000..25aa7ee19 --- /dev/null +++ b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/_generateMetadtataFile.php @@ -0,0 +1,23 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +require_once '../../../../../vendor/autoload.php'; + +const INPUT_TXT_FILE = 'input.yml'; + +// parse the input.yml file for context +$inputCfg = \Symfony\Component\Yaml\Yaml::parse(file_get_contents(INPUT_TXT_FILE)); + +// create new MetadataGenUtil Object +$metadataGenUtil = new Magento\FunctionalTestingFramework\Util\MetadataGenerator\MetadataGenUtil( + $inputCfg['operationName'], + $inputCfg['operationDataType'], + $inputCfg['operationUrl'], + $inputCfg['inputString'] +); + +//generate the metadata file in the _output dir +$metadataGenUtil->generateMetadataFile(); diff --git a/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/input.yml.sample b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/input.yml.sample new file mode 100644 index 000000000..503aef067 --- /dev/null +++ b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/input.yml.sample @@ -0,0 +1,4 @@ +operationName: createMyEntity +operationDataType: myEntityType +operationUrl: /admin/system_config/save/someEntity +inputString: entity[param1]=value1&entity[param2]=value2&entity[param3]=value3&entityField=field1 diff --git a/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/operation.mustache b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/operation.mustache new file mode 100644 index 000000000..ad81c99ae --- /dev/null +++ b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/operation.mustache @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../DataGenerator/etc/dataOperation.xsd"> + <operation name="{{operationName}}" dataType="{{operationDataType}}" type="create" auth="adminFormKey" url="{{operationUrl}}" method="POST"> + {{>object}} + </operation> +</config> diff --git a/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/partials/field.mustache b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/partials/field.mustache new file mode 100644 index 000000000..284835ef2 --- /dev/null +++ b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/partials/field.mustache @@ -0,0 +1 @@ +<field key="{{fieldName}}">string</field> diff --git a/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/partials/object.mustache b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/partials/object.mustache new file mode 100644 index 000000000..7d3aaf5ca --- /dev/null +++ b/src/Magento/FunctionalTestingFramework/Util/MetadataGenerator/views/partials/object.mustache @@ -0,0 +1,10 @@ +{{#objects}} +<object key="{{objectName}}" dataType="{{dataType}}"> +{{#fields}} + {{> field}} +{{/fields}} +{{#hasChildObj}} + {{> object}} +{{/hasChildObj}} +</object> +{{/objects}} diff --git a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php index f1c2b630a..2108627aa 100644 --- a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php +++ b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php @@ -121,15 +121,14 @@ private function createCestFile($cestPhp, $filename) * to the createCestFile function. * * @param string $runConfig - * @param string $env * @return void */ - public function createAllCestFiles($runConfig = null, $env = null) + public function createAllCestFiles($runConfig = null) { DirSetupUtil::createGroupDir($this->exportDirectory); // create our manifest file here - $testManifest = new TestManifest($this->exportDirectory, $runConfig, $env); + $testManifest = new TestManifest($this->exportDirectory, $runConfig); $cestPhpArray = $this->assembleAllCestPhp($testManifest); foreach ($cestPhpArray as $cestPhpFile) { @@ -376,8 +375,13 @@ private function generateStepsPhp($stepsObject, $stepsData, $hookObject = false) $time = $customActionAttributes['timeout']; } - if (isset($customActionAttributes['parameterArray'])) { - $parameterArray = $customActionAttributes['parameterArray']; + if (isset($customActionAttributes['parameterArray']) && $actionName != 'pressKey') { + // validate the param array is in the correct format + $this->validateParameterArray($customActionAttributes['parameterArray']); + + $parameterArray = "[" . $this->addUniquenessToParamArray( + $customActionAttributes['parameterArray'] + ) . "]"; } if (isset($customActionAttributes['requiredAction'])) { @@ -721,6 +725,29 @@ private function generateStepsPhp($stepsObject, $stepsData, $hookObject = false) $testSteps .= $this->wrapFunctionCall($actor, $actionName, $selector, $parameterArray); break; case "pressKey": + $parameterArray = $customActionAttributes['parameterArray'] ?? null; + if ($parameterArray) { + // validate the param array is in the correct format + $this->validateParameterArray($parameterArray); + + // trim off the outer braces and add commas for the regex match + $params = "," . substr($parameterArray, 1, strlen($parameterArray) - 2) . ","; + + // we are matching any nested arrays for a simultaneous press, any string literals, and any + // explicit function calls from a class. + preg_match_all('/(\[.*?\])|(\'.*?\')|(\\\\.*?\,)/', $params, $paramInput); + + //clean up the input by trimming any extra commas + $tmpParameterArray = []; + foreach ($paramInput[0] as $params) { + $tmpParameterArray[] = trim($params, ","); + } + + // put the array together as a string to be passed as args + $parameterArray = implode(",", $tmpParameterArray); + } + $testSteps .= $this->wrapFunctionCall($actor, $actionName, $selector, $input, $parameterArray); + break; case "selectOption": $testSteps .= $this->wrapFunctionCall($actor, $actionName, $selector, $input, $parameterArray); break; @@ -913,6 +940,8 @@ private function resolveTestVariable($inputString, $args) */ private function replaceMatchesIntoArg($matches, &$outputArg, $delimiter) { + // Remove Duplicate $matches from array. Duplicate matches are replaced all in one go. + $matches = array_unique($matches); foreach ($matches as $match) { $replacement = null; $variable = $this->stripAndSplitReference($match, $delimiter); @@ -950,25 +979,26 @@ private function processQuoteBreaks($match, $argument, $replacement) $outputArg = $argument; $beforeIndex = strpos($outputArg, $match) - 1; $afterIndex = $beforeIndex + strlen($match) + 1; - $quoteBefore = true; - $quoteAfter = true; - // Prepare replacement with quote breaks if needed - if ($argument[$beforeIndex] != "\"") { - $replacement = '" . ' . $replacement; - $quoteBefore = false; + $quoteBefore = false; + // Determine if there is a " before/after the $match, and if there is only one " before/after match. + if ($beforeIndex == 0 + || ($argument[$beforeIndex] == '"' && substr_count($argument, '"', 0, $beforeIndex) < 1)) { + $quoteBefore = true; } - if ($argument[$afterIndex] != "\"") { - $replacement = $replacement . ' . "'; - $quoteAfter = false; - } - //Remove quotes at either end of argument if they aren't necessary. + $quoteAfter = $argument[$afterIndex] == '"' && substr_count($argument, '"', $afterIndex+1) < 1; + + //Remove quotes at either end of argument if they aren't necessary. Add double-quote concatenation if needed. if ($quoteBefore) { $outputArg = substr($outputArg, 0, $beforeIndex) . substr($outputArg, $beforeIndex+1); $afterIndex--; + } else { + $replacement = '" . ' . $replacement; } if ($quoteAfter) { $outputArg = substr($outputArg, 0, $afterIndex) . substr($outputArg, $afterIndex+1); + } else { + $replacement = $replacement . ' . "'; } $outputArg = str_replace($match, $replacement, $outputArg); return $outputArg; @@ -1168,6 +1198,40 @@ private function generateTestsPhp($testsObject) return $testPhp; } + /** + * Detects uniqueness function calls on given attribute, and calls addUniquenessFunctionCall on matches. + * @param string $input + * @return string + */ + private function addUniquenessToParamArray($input) + { + $tempInput = trim($input, "[]"); + $paramArray = explode(",", $tempInput); + $result = []; + + foreach ($paramArray as $param) { + // Determine if param has key/value array notation + if (preg_match_all('/(.+)=>(.+)/', trim($param), $paramMatches)) { + $param1 = $this->addUniquenessToParamArray($paramMatches[1][0]); + $param2 = $this->addUniquenessToParamArray($paramMatches[2][0]); + $result[] = trim($param1) . " => " . trim($param2); + continue; + } + + // Matches strings wrapped in ', we assume these are string literals + if (preg_match('/^(["\']).*\1$/m', trim($param))) { + $result[] = $param; + continue; + } + + $replacement = $this->addUniquenessFunctionCall(trim($param)); + + $result[] = $replacement; + } + + return implode(", ", $result); + } + /** * Add uniqueness function call to input string based on regex pattern. * @@ -1302,4 +1366,18 @@ private function wrapFunctionCallWithReturnValue($returnVariable, $actor, $actio return $this->resolveTestVariable($output, $args); } // @codingStandardsIgnoreEnd + + /** + * Validates parameter array format, making sure user has enclosed string with square brackets. + * + * @param string $paramArray + * @return void + * @throws TestReferenceException + */ + private function validateParameterArray($paramArray) + { + if (substr($paramArray, 0, 1) != "[" || substr($paramArray, strlen($paramArray)-1, 1)!= "]") { + throw new TestReferenceException("parameterArray must begin with `[` and end with `]"); + } + } } diff --git a/src/Magento/FunctionalTestingFramework/Util/TestManifest.php b/src/Magento/FunctionalTestingFramework/Util/TestManifest.php index 4991a6644..eb3de6953 100644 --- a/src/Magento/FunctionalTestingFramework/Util/TestManifest.php +++ b/src/Magento/FunctionalTestingFramework/Util/TestManifest.php @@ -11,7 +11,6 @@ class TestManifest { const SINGLE_RUN_CONFIG = 'singleRun'; - const DEFAULT_BROWSER = 'chrome'; const TEST_MANIFEST_FILENAME = 'testManifest.txt'; /** @@ -21,13 +20,6 @@ class TestManifest */ private $filePath; - /** - * Test Manifest environment flag. This is added to each dir or file in order for tests to execute properly. - * - * @var string $environment - */ - private $environment = self::DEFAULT_BROWSER; - /** * Type of manifest to generate. (Currently describes whether to path to a dir or for each test). * @@ -47,9 +39,8 @@ class TestManifest * * @param string $path * @param string $runConfig - * @param string $env */ - public function __construct($path, $runConfig, $env) + public function __construct($path, $runConfig) { $this->relativeDirPath = substr($path, strlen(dirname(dirname(TESTS_BP))) + 1); $filePath = $path . DIRECTORY_SEPARATOR . self::TEST_MANIFEST_FILENAME; @@ -58,10 +49,6 @@ public function __construct($path, $runConfig, $env) fclose($fileResource); $this->runTypeConfig = $runConfig; - - if ($env) { - $this->environment = $env; - } } /** @@ -87,7 +74,7 @@ public function recordCest($cestName, $tests) foreach ($tests as $test) { $line = $this->relativeDirPath . DIRECTORY_SEPARATOR . $cestName . '.php:' . $test->getName(); - fwrite($fileResource, $this->appendDefaultBrowser($line) ."\n"); + fwrite($fileResource, $line . PHP_EOL); } fclose($fileResource); @@ -102,21 +89,8 @@ public function recordCest($cestName, $tests) public function recordPathToExportDir() { $fileResource = fopen($this->filePath, 'a'); - $line = $this->relativeDirPath . DIRECTORY_SEPARATOR; - fwrite($fileResource, $this->appendDefaultBrowser($line) ."\n"); - + fwrite($fileResource, $line . PHP_EOL); fclose($fileResource); } - - /** - * Function which appends the --env flag to the test. This is needed to properly execute all tests in codeception. - * - * @param string $line - * @return string - */ - private function appendDefaultBrowser($line) - { - return "${line} --env " . $this->environment; - } }