PK &?V ކ| | codeceptnu W+A #!/usr/bin/env php
add(new Codeception\Command\Build('build'));
$app->add(new Codeception\Command\Run('run'));
$app->add(new Codeception\Command\Init('init'));
$app->add(new Codeception\Command\Console('console'));
$app->add(new Codeception\Command\Bootstrap('bootstrap'));
$app->add(new Codeception\Command\GenerateCept('generate:cept'));
$app->add(new Codeception\Command\GenerateCest('generate:cest'));
$app->add(new Codeception\Command\GenerateTest('generate:test'));
$app->add(new Codeception\Command\GenerateSuite('generate:suite'));
$app->add(new Codeception\Command\GenerateHelper('generate:helper'));
$app->add(new Codeception\Command\GenerateScenarios('generate:scenarios'));
$app->add(new Codeception\Command\Clean('clean'));
$app->add(new Codeception\Command\GenerateGroup('generate:groupobject'));
$app->add(new Codeception\Command\GeneratePageObject('generate:pageobject'));
$app->add(new Codeception\Command\GenerateSnapshot('generate:snapshot'));
$app->add(new Codeception\Command\GenerateStepObject('generate:stepobject'));
$app->add(new Codeception\Command\GenerateEnvironment('generate:environment'));
$app->add(new Codeception\Command\GenerateFeature('generate:feature'));
$app->add(new Codeception\Command\GherkinSnippets('gherkin:snippets'));
$app->add(new Codeception\Command\GherkinSteps('gherkin:steps'));
$app->add(new Codeception\Command\DryRun('dry-run'));
$app->add(new Codeception\Command\ConfigValidate('config:validate'));
// Suggests package
if (class_exists('Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand')) {
$app->add(new Codeception\Command\Completion());
} else {
$app->add(new Codeception\Command\CompletionFallback());
}
$app->registerCustomCommands();
$app->run();
PK &?VnoTWN N LICENSEnu W+A The MIT License (MIT)
Copyright (c) 2011 Michael Bodnarchuk and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
PK &?V-KT T CHANGELOG-2.1.mdnu W+A #### 2.1.11
* [Yii1] Improved Yii connector. AR metadata is cleaned up between requests. `regenerateId` of session is disabled.
* [REST][InnerBrowser] redirect is not triggered when Location header is set but response code is not 3xx. By @Naktibalda. Fixes #3171.
* [PhpBrowser][Frameworks] checkboxes can be located by label by @dizzy7. See #3237
* [PhpBrowser][Frameworks] field can be matched by its trimmed label value. See #3209. By @dizzy7
* [WebDriver] fixed URL matching in WebDriver::seeLink
* [WebDriver][InnerBrowser] Improved error messages of `seeLink` and `dontSeeLink`
#### 2.1.10
* PHPUnit version locked to <5.4
* [Db] Added missing support for LIKE condition to SqlSrv driver
#### 2.1.9
* PHPUnit 5.4 compatibility for creating mocks using `Codeception\Util\Stub` by @davertmik. See #3093 and #3080
* Updated dependencies to support Symfony 3.1
* [Laravel5] Fixed issue where non-existing services were called in _before and _after methods. See #3028.
* Fix self-update command to update only to stable versions by @MAXakaWIZARD
* Added `settings: backup_global` to config, to disable backup_global option of PHPUnit by @mkeasling. See #3045. Fixes #3044
* [PhpBrowser][Frameworks] `see` matches UTF-8 text case-insensitively by @Naktibalda. Fixes #3114
* Fixed page object generation with namespaces by @eugene-manuilov and @Naktibalda. See #3126 Fixes #3012
* `--steps` will not disable code coverage. By @Naktibalda. Fixes #2620
* Suppress console coverage report with `--quiet` by @EspadaV8. See #2370
* Improved multibyte output in console by @kt81. See #3130
* [Lumen] Fixed: `initializeLumen()` method has been called twice on start by @kt81. See #3124 #2607
* [Db] Allow INT Parameter SQL Binding by @davidcochrum . Fixes #3118
* [Db] Support LIKE conditions in assertions.
* [Db] Improved regex for parsing comments by @dima-stefantsov. See #3138
* [Dbh] Fix `seeInDatabase` and `dontSeeInDatabase` with empty criteria. Closes #3116
* [Symfony] Improve fail messages on seeInCurrentRoute and seeCurrentRouteIs
* [Symfony] Improve route comparison on seeInCurrentRoute and seeCurrentRouteIs
* [WebDriver] multi session testing with friends improved by @eXorus. Webdriver sessions are finished correctly; `leave()` method added to Friend class. See #3068
* [PhpBrowser] added `handler` and `middleware` config options to customize Guzzle handlers and middleware
* Added full support of phpunit-bridge features.
* [Laravel] Fixed issue where non-existing services were called in _before and _after methods. See #3028.
* [WebDriver] fixed using `saveSessionSnapshot` with codecoverage. Closes #2923
* [ZF2] create new instance of Application for each request
#### 2.1.8
* `Util\Locator` added methods to create locators to match element at their position: `elementAt`, `firstElement`, `lastElement`
* [Symfony] Refactor to unify service retrieval, avoid memleaks and reduce memory footprint. Closes #2938 and #2954.
* [Symfony] New optoin `rebootable_client` that reboots client's kernel before each request.
* [WebDriver] fixed `seeInField` for textarea with whitespaces before and after string. Closes #2921
* [Symfony] Deprecated `grabServiceFromContainer` use `grabService` instead. For consistency with other frameworks.
* [Asserts] More `assert*` methods from PHPUnit added
* [Asserts] Added `expectException` method
* `codecept self-update` works with proxy by @gr1ev0us
* [Phalcon1 add params support for method amOnRoute by @MelnykDmitro
#### 2.1.7
* **PHPUnit 5.x support**
* Global Bootstrap, Suite Bootstrap, Module Initialization happens before test loading. Fixes issues of autoloading TestCase classes introduced in 2.1.5, see #2872
* Added option to skip PHP files validation in `codeception.yml` - `settings: lint: false`
* [Facebook] Updated to facebook/php-sdk-v4 version 5 by @orhan-swe and @tigerseo #2828 #2415
* [WebDriver] Added `scrollTo` action by @javigomez and @davertmik #2844
* Fix encoding problems in PHP prior to 5.6 by @pejaycz. See #2831
* [Queue] Fixed `clearQueue` for AmazonSQS by @mikitu #2805
* [Db] Fixed loading files in Sqlite @mcustiel See #2812
* [PhpBrowser] `amHttpAuthenticated` allows null, null as parameters to unset authentication. #2896
* `Util\Locator` added `contains` method to easily locate any element containing a text.
* [Laravel5] Added `guard` parameters to `seeAuthentication` and `dontSeeAuthentication` methods. By @janhenkgerritsen. See #2876
* [Laravel5] Added functionality to disable/enable Laravel's exception handling. By @janhenkgerritsen. See #2763
* [Laravel5] Authentication now persists between requests when calling `amLoggedAs` with an instance of `Authenticable`. See #2795
* [REST] Fixed dontSeeXmlResponseMatchesXpath method #2825 by @mangust404
* [ZF2] Fixed POST parameters #2814 by @Naktibalda
* [ZF1] Call Zend_Registry::_unsetInstance in _after #2863 by @Naktibalda
#### 2.1.6
* Starting from 2.1.6 you can **download PHP 5.4 compatible phar build** at http://codeception.com/php54/codecept.phar by @Naktibalda. See [installation guide](http://codeception.com/install).
* [WebDriver] Fixed uploading files with **PhantomJS** #1823 by @DavertMik and @Naktibalda. Please specify your browser name as `phantom` in WebDriver config in order to use PhantomJS-specific hooks.
* Fixed parsing PHP files with spaces in name on PHP<7 by @acuthbert. Fixes #2647
* [WebDriver] Fixed proxy error when using with Chrome #2651 by @vaikla
* [Laravel5] Allow Laravel5 application URL to be set through config. By @gmhenderson. See #2676
* [Laravel5] Mocked events should also return an array. Fix by @devinfd
* Fixed using codecoverage with environments #2634
* Various HHVM improvements by @Naktibalda, for instance, Asserts module issues has been fixed.
* [REST] Fixes #2775 `seeResponseJsonMatchesXpath` when JSON contains ampersand. By @Naktibalda.
* [Filesystem] Added `seeNumberNewLines` method to check the number of new lines in opened file. By @sergeyklay
* [Symfony2] Added `seeCurrentRouteMatches` action by @laszlo-karpati See #2665
* [Sequence] Added `sqs` function to generate unique sequences per suite. #2766 by @johnatannvmd
* [FTP] Fixed various bugs by @k-serenade. See #2755
* [Frameworks][PhpBrowser] Fixed #2733: `seeOptionIsSelected` sees first option as selected if none is selected by @Naktibalda
* [Symfony2] Removed 'localhost' from getInternalDomains by @Naktibalda. Fixed #2717
* Bugfix for using groups by directory on Windows by @tortuetorche See #2550 and #2551
* [REST] Fixed failed message for `seeHttpHeader` and `dontSeeHttpHeader` from null to expected value #2697 by @zondor
* [REST] Added methods to control redirect: `stopFollowingRedirects` and `startFollowingRedirects` by @brutuscat
* [Recorder Extension] Added `animate_slides` config to disable left-right sliding animation between screenshots by @vml-rmott
#### 2.1.5
* **PHP7 support**
* **Symfony3 support**
* [ZendExpressive] **module added** by @Naktibalda
* [Frameworks] **Internal Domains**: Framework modules now throw an `ExternalUrlException` when a test tries to open a URL that is not handled by the framework, i.e. an external URL. See #2396
* Syntax check for tests. If PHP7 is used, `ParseException` handles syntax error, otherwise linting happens with `php -l`. @davertmik
* Fixed Cest generation to not include "use" statements if no namespaces set
* [REST] Modified JsonArray::sequentialArrayIntersect to return complete matches only by @Naktibalda. Fixes #2635
* [REST] Fixes validation of several types with filters. See #2581 By @davertmik
* [REST] JsonType improved URL filter to use `filter_var($value, FILTER_VALIDATE_URL)`
* [REST] JsonType to support collections: all items in an array will be validates against JsonType. By @davertmik
* [REST] Various fixes to JsonType: #2555 #2548 #2542
* [REST] Hides binary request data in debug by @codemedic. Fixed #1884, See #2552
* [WebDriver] Allow `appendField` to work with content editable div by @nsanden #2588
* [WebDriver] Allows adding ssl proxy settings by @mjntan35.
* [Symfony2] Config option `cache_router` added (disabled by default) by @raistlin.
* [Doctrine] Fixed #2060: Too many connections error by @dranzd
* [Symfony2] `services` part added to allow access Symfony DIC while wokring with WebDriver or PhpBrowser by @laszlo-karpati See #2629
* [WebDriver][PhpBrowser] Unified setCookie "expires" param name by @davertmik. See #2582
* [Memcache] add adaptive close call on `_after` by @pfz. See #2572
* [Symfony2] Move kernel booting and container set up into _initialize() method by @Franua #2491
* [WebDriver] Fixed `seeInField` for textareas by @nsanden
* [Yii2][REST] Fixed using Yii2 as dependency for REST by @Naktibalda. See #2562
* [Laravel5] Removed `enableMiddleware` and `enableEvents` methods. See #2602. By @janhenkgerritsen
* [Laravel] Refactored modules. See #2602. By @janhenkgerritsen
* [Laravel5] Fix bug for `seeCurrentRouteIs` when routes don't match. See #2593. By @maddhatter
* [PhpBrowser] Set curl options for Guzzle6 correctly. See #2533. By @Naktibalda
* Fixed usage of GroupObject by unit tests. GroupObjects can skip tests by @davetmik. See #2617
#### 2.1.4
* [PhpBrowser][Frameworks] Added `_getResponseContent` hidden method. By @Naktibalda
* [PhpBrowser][Frameworks] Added `moveBack` method. By @Naktibalda
* [WebDriver][PhpBrowser][Frameworks] Added `seeInSource`, `dontSeeInSource` methods to check raw HTML instead of stripped text in `see`/`dontSee`. By @zbateson in #2465
* [WebDriver] print Selenium WebDriver logs on failure or manually with `debugWebDriverLogs` in debug mode. Config option `debug_log_entries` added. See #2471 By @MasonM and @DavertMik.
* [ZF2] grabs service from container without reinitializing it. Fixes #2519 where Doctrine2 gets different instances of the entity manager everytime grabServiceFromContainer is called. By @dranzd
* [REST] fixed usage of JsonArray and `json_last_error_msg` function on PHP 5.4. See #2535. By @Naktibalda
* [REST] `seeResponseIsJsonType` can now validate emails with `string:email` definition. By @DavertMik
* [REST] `seeResponseIsJsonType`: `string|null` as well as `null|string` can be used to match null type. #2522 #2500 By @vslovik
* [REST] REST methods can be used to inspect result of the last request made by PhpBrowser or framework module. see #2507. By @Naktibalda
* [Silex] Doctrine provider added. Doctrine2 module can be connected to Silex app with `depends: Silex` in config. By @arduanov #2503
* [Laravel5] Removed `expectEvents` and added `seeEventTriggered` and `dontSeeEventTriggered`. By @janhenkgerritsen
* [Laravel5] Fixed fatal error in `seeCurrentRouteIs` and `seeCurrentActionIs` methods. See #2517. By @janhenkgerritsen
* [Laravel5] Improved the error messages for several methods. See #2476. By @janhenkgerritsen
* [Laravel5] Improved form error methods. See #2432. By @janhenkgerritsen
* [Laravel5] Added wrapper methods for Laravel 5 model factories. See #2442. By @janhenkgerritsen
* [Phalcon] Added `amOnRoute` and `seeCurrentRouteIs` methods by @sergeyklay
* [Phalcon] Added `seeSessionHasValues` by @sergeyklay
* [Phalcon] Added `getApplication()` method by @sergeyklay
* [Symfony2] Sets `xdebug.max_nesting_level` to 200 only if it is lower. Fixes error hiding #2462 by @mhightower
* [Db] Save the search path when importing Postgres dumps #2441 by @EspadaV8
* [Yii2] Fixed problems with transaction rollbacks when using the `cleanup` flag. See #2488. By @ivokund
* [Yii2] Clean up previously uploaded files between tests by @tibee
* Actor classes generation improved by @codemedic #2453
* Added support for nested helper by @luka-zitnik #2494
* Make `generate:suite` respect bootstrap setting in #2512. By @dmitrivereshchagin
#### 2.1.3
* [REST] **Added matching data types** by with new methods `seeResponseMatchesJsonType` and `dontSeeResponseMatchesJsonType`. See #2391
* [PhpBrowser][Frameworks] added `_request` and `_loadPage` hidden API methods for performing arbitrary requests.
* [PhpBrowser][Frameworks] Fixed `seeInField`, `dontSeeInField` for disabled fields #2378. See #2414.
* Environment files can now be located in subfolders of `tests/_env` by @Zifius
* [Symfony2] Fixed issue when accessing profiler when no request has been performed #652.
* [Symfony2] Added `amOnRoute` and `seeCurrentRouteIs` methods by @raistlin
* [ZF2] Added `amOnRoute` and `seeCurrentRouteIs` methods module, by @Naktibalda
* Fixed issue with trailing slashes in `seeCurrentUrlEquals` and `dontSeeCurrentUrlEquals` methods #2324. By @janhenkgerritsen
* Warning is displayed once using unconfigured environment.
* Fixed loading environment configurations for Cept files by @splinter89
* Fixed bootstrap with namespaces to inject namespaced actor classes properly.
* [PhpBrowser][Frameworks] added hidden `_request()` method to send requests to backend from Helper classes.
* [Laravel5] Added `disableEvents()`, `enableEvents()` and `expectEvents()` methods. By @janhenkgerritsen
* [Laravel5] Added `dontSeeFormErrors()` method. By @janhenkgerritsen
* [Db] Deleted Oracle driver (it existed by mistake, the real driver is Oci). By @Naktibalda
* [Db] Implemented getPrimaryKey method for Sqlite, Mysql, Postgresql, Oracle and MsSql. By @Naktibalda
* [Db] Implemented support for composite primary keys and tables without primary keys. By @Naktibalda
* Fixed the scalarizeArray to be aware of NULL fields #2264. By @fbidu
* [Soap] Fixed SOAP module #2296. By @relaxart
* Fixed a bug where blank lines in a groups file would run every test in the project #2297. By @imjoehaines
* [WebDriver] seeNumberOfElements should only count visible elements #2303. By @sascha-egerer
* [PhpBrowser][Frameworks] Verbose output for all HTTP requests. By @Naktibalda
* [PhpBrowser][Frameworks] Throw `Codeception\Exception\ExternalUrlException` when framework module tries to open an external URL #2328. By @Naktibalda
* [PhpBrowser][Frameworks] Added `switchToIframe` method. By @Naktibalda
* [Dbh] module deprecated
#### 2.1.2
* **Updated to PHPUnit 4.8**
* Enhancement: **Wildcard includes enabled when testing [multiple applications](http://codeception.com/docs/08-Customization#One-Runner-for-Multiple-Applications)**. See #2016 By @nzod
* [Symfony2] fixed Doctrine2 integration: Doctrine transactions will start before each test and rollback afterwards. *2015-08-08*
* [Doctrine2] establishing connection and starting transaction is moved to `_before`. *2015-08-08*
* [PhpBrowser] Removed disabled and file fields from form values. By @Naktibalda *2015-08-08*
* [ZF2] Added grabServiceFromContainer function. By InVeX *2015-08-08*
* [PhpBrowser][Guzzle6] Disabled strict mode of CookieJar #2234 By @Naktibalda *2015-08-04*
* [Laravel5] Added `disableMiddleware()` and `enableMiddleware()` methods. By @janhenkgerritsen *2015-08-07*
* Enhancement: If a specific *ActorActions trait does not exist in `tests/_support/_generated` directory, it will be created automatically before run.
* Enhancement: do not execute all included suites if you run one specific suite *2015-08-08*
* `Extension\Recorder` navigate over slides with left and right arrow keys, do not create screenshots for comment steps.
* `Extension\Recorder` generates index html for all saved records.
* `Extension\Recorder` fixed for creating directories twice. Fixed #2216
* `Extension\Logger` fixed #2216
* Fixed injection of Helpers into Cest and Test files. See #2222
* `Stub::makeEmpty` on interfaces works again by @Naktibalda
* Command `generate:scenarios` fixed for Cest files by @mkudenko See #1962
* [Db] Quoted table name in Db::select, removed identical methods from child classes by @Naktibalda. See #2231
* [WebDriver] added support for running tests on a remote server behind a proxy with `http_proxy` and `http_proxy_port` config options by @jdq22 *2015-07-29*
* [Laravel] Fixed issue with error handling for `haveRecord()` method in Laravel modules #2217 by @janhenkgerritsen *2015-07-28*
* Fixed displayed XML/HTML report path #2187 by @Naktibalda *2015-07-27*
* [WebDriver] Fixed `waitForElementChange` fatal error by @stipsan
* [Db] Enhanced dollar quoting ($$) processing in PostgreSQL driver by @YasserHassan *2015-07-20*
* [REST] Created tests for file-upload with REST module. By @Naktibalda *2015-08-08*
* [Lumen] Fixed issue where wrong request object was passed to the Lumen application by @janhenkgerritsen *2015-07-18*
#### 2.1.1
* [WebDriver] **Upgraded to facebook/webdriver 1.0** *2015-07-11*
WebDriver classes were moved to `Facebook\WebDriver` namespace. Please take that into account when using WebDriver API directly.
Till 2.2 Codeception will keep non-namespaced aliases of WebDriver classes.
* Module Reference now contains documentation for hidden API methods which should be used in Helper classes
* Skipped and Incomplete tests won't fire `test.before` and `test.after` events. For instance, WebDriver browser won't be started and Db cleanups won't be executed on incomplete or skipped tests.
* Annotations `skip` and `incomplete` enabled in Cest files #2131
* [WebDriver][PhpBrowser][Frameworks] `_findElements($locator)` method added to use in Helper classes *2015-07-11*
Now you can use `$this->getModule('WebDriver')->findElements('.user');` in Helpers to match all elements with `user` class using WebDriver module
* [PhpBrowser] Fixed `amOnUrl` method to open absolute URLs.
* [PhpBrowser][Frameworks] Fix for `fillField` using values that contain ampersands by @GawainLynch and @zbateson Issue #2132
* [WebDriver][PhpBrowser][Frameworks] Fixed missing HTTPS when trying to access protected pages #2141
#### 2.1.0
* [Recorder](https://github.com/Codeception/Codeception/tree/master/ext#codeceptionextensionrecorder) extension added. Shows acceptance test progress with a recorded slideshow.
* **Updated to Guzzle 6**. Codeception can now work both with Guzzle v5 and Guzzle v6. PhpBrowser chooses right connector depending on Guzzle version installed. By @davertmik and @enumag
* Annotations in Cept files.
Instead of calling `$scenario->skip()`, `$scenario->group('firefox')`, etc, it is recommended to set scenario metadata with annotations `// @skip`, `// @group firefox`.
Annotations can be parsed from line or block comments. `$scenario->skip()` and `$scenario->incomplete()` are still valid and can be executed inside conditional statements:
```
if (!extension_loaded('xdebug')) $scenario->skip('Xdebug required')
```
* **PSR-4**: all support classes moved to `tests/_support` by default. Actors, Helpers, PageObjects, StepObjects, GroupObjects to follow PSR-4 naming style. Autoloader implemented by @splinter89.
* **Dependency Injection**: support classes can be injected into tests. Support classes can be injected into each other too. This happens by implementing method `_inject` and explicitly specifying class names as parameters. Implemented by @splinter89.
* **Actor classes can be extended**, their generated parts were moved to special traits in `_generated` namespace. Each *Tester class can be updated with custom methods.
* **Module config simplified**: Modules can be configured in `enabled` section of suite config.
* **Conflicts**: module can define conflicts with each other by implementing `_conflicts` method
* **Dependencies**: module can explicitly define dependencies and expect their injection by implementing `_inject` and `_depends` methods and relying on dependency injection container.
* **Current** modules, environment, and test name can be received in scenario. Example: `$scenario->current('env')` returns current environment name. Fixes #1251
* **Environment Matrix**: environments can be merged. Environment configs can be created in `tests/_envs`, environment generator added. Implemented by By @sjableka. See #1747
* **Custom Printers**: XML, JSON, TAP, Report printers can be redefined in configuration. See #1425
* [Db] Added `reconnect` option for long running tests, which will connect to database before the test and disconnect after. By @Naktibalda
* Module parts. Actions of modules can be loaded partially in order to disable actions which are not used in current tests. For instance, disable web actions of framework modules in unit testsing.
* **Kohana**, **Symfony1**, **Doctrine1** modules considered deprecated and moved to standalone packages.
* `shuffle` added to settings. Randomizes order of running tests. See #1504
* Console output improved: scenario stack traces contain files and lines of fail.
* [Doctrine2][Symfony2] `symfony_em_service` config option moved from Doctrine2 to Symfony2 module and renamed to `em_service` *2015-06-03*
* [PhpBrowser][Frameworks] Fixed cloning form nodes `Codeception\Lib\InnerBrowser::getFormFromCrawler(): ID XXX already defined` *2015-05-13*
* [WebDriver] session snapshot implemented, allows to store cookies and load them, i.e., to keep user session between testss.
* [WebDriver][PhpBrowser][Frameworks] Malformed XPath locators wil throw an exception #1441
* `MODULE_INIT` event is fired before initializing modules #1370
* Graceful tests termination using `pcntl_signal`. See #1286
* Group classes renamed to GroupObjects; Base GroupObject class renamed to `Codeception\GroupObject`
* Official extensions moved to `ext` dir; Base Extension class renamed to `Codeception\Extension`
* Duplicate environment options won't cause Codeception to run environment tests twice
* [Phalcon1] `haveServiceInDi` method implemented by @sergeyklay
* [Db] `seeNumRecords` method added by @sergeyklayPK &?V@M M appveyor.ymlnu W+A build: false
shallow_clone: true
platform: 'x86'
branches:
except:
- gh-pages
cache:
- c:\tools\php71 -> appveyor.yml
services:
- mysql
- postgresql93
- mongodb
init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php71;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1
- SET ANSICON=121x90 (121x90)
install:
# databases setup
- SET PATH=C:\Program Files\MySql\MySQL Server 5.7\bin\;%PATH%
- SET PGUSER=postgres
- SET PGPASSWORD=Password12!
- SET PATH=C:\Program Files\PostgreSQL\9.3\bin\;%PATH%
# php setup
- IF EXIST c:\tools\php71 (SET PHP=0)
- IF %PHP%==1 cinst -y OpenSSL.Light
- SET PATH=C:\Program Files\OpenSSL;%PATH%
- cinst -y curl
- SET PATH=C:\Program Files\curl;%PATH%
- sc config wuauserv start= auto
- net start wuauserv
- IF %PHP%==1 cinst -y php --version 7.1.14
- IF %PHP%==1 cd c:\tools\php71
- IF %PHP%==1 copy php.ini-production php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini
- IF %PHP%==1 echo extension=php_pdo_mysql.dll >> php.ini
- IF %PHP%==1 echo extension=php_pdo_pgsql.dll >> php.ini
- IF %PHP%==1 echo extension=php_pdo_sqlite.dll >> php.ini
- IF %PHP%==1 echo extension=php_pgsql.dll >> php.ini
- SET PATH=C:\tools\php71;%PATH%
- cd %APPVEYOR_BUILD_FOLDER%
- appveyor DownloadFile https://getcomposer.org/composer.phar
- php composer.phar install --prefer-dist -n --no-ansi
before_test:
- createdb codeception_test
- mysql -uroot -pPassword12! -e "CREATE DATABASE codeception_test"
test_script:
- php codecept run cli --no-colors -n --skip-group coverage
- php codecept run unit -g core -g appveyor --no-colors -n
PK &?Vr r CHANGELOG-2.2.mdnu W+A
#### 2.2.12
* Don't skip other tests after a failed test #4226 by @Naktibalda
* [REST] `seeResponseContainsJson` doesn't crash when json response is not an array by @Naktibalda
* [PhpBrowser] Fixed redirecting to schemaless url by @Naktibalda #4218
* [Doctrine2] Added `grabEntityFromRepository`, `grabEntitiesFromRepository` methods by @maximelebastard
#### 2.2.11
* [WebDriver] Added `_restart` method to restart browser with a new configuration.
* [WebDriver] Added `_findClickable` to public API so can be used from helpers. By @tiger-seo
* [WebDriver] `seeLink` compares relative links correctly #4182
* [Webdriver] fixed attachFile messages when the file does not exist by @Naktibalda
* Fixed setting paths in environments and using `--override` options. By @kusnir. See #4143
* [Yii1] Allow to set only host in `url` config. #4172 by @SG5.
* [Yii1] Allow to make requests end with slash. #4190 by @SG5
* [Yii2] Allows use `InitDbFixture` feature #4201
* [Yii2] Add missing YII2 lifecycle events. #4187
* Don't run test if exception was thrown in `_before` of a module #4197 by @Naktibalda
* [Mongo] Fixed parsing dbname. See #4186 by @retnek
* [Mongo] Improved legacy driver check by @retnek. See #4178
* [WebDriver][PhpBrowser][Frameworks] Added `grabPageSource` method by @Kolyunya
* [PhpBrowser][REST] Add DELETE method to supported form data request methods in Guzzle6 by
* [PhpBrowser][REST] Restore request headers in multi-session testing. Fixes #4157
* Recorder Extension: Replace non-alphanumeric characters with underscores by @tiger-seo. Fixes Recorder on Windows
* [REST] Documented different ways to upload files
* Fixed `$scenario->current('name')` #4154 by @Naktibalda
* [AMQP] Documented parameters of `declareQueue`, `declareExchange` by @Naktibalda
* [Doctrine2] Safe prefix aliases for `buildAssociationQuery` by @jfxninja. See #4195
* Fixed output of failed step by @Naktibalda #4135 http://phptest.club/t/seeelement-wierd-fail-message/1470
* [WebDriver] fixed `friend->leave` method. Clearing base element on closing session. Fixes #4098
* [Symfony] Make symfony bootstrap.php.cache optional for php version > 7 by @patrickjahns
* Gherkin: Command `gherkin:snippets` to generate stub function name for non-english features. By @kuntashov
* Gherkin: Steps with PyString and with inline string argument considered the same. Fixes #4121 by @kuntashov
* [Db] `Oci::cleanup()` should be able to drop objects with case sensitive name. By @pavelkovar
* [Db] loadDump reports sql statement which caused error, fixes regression from 2.2.10. See #4120. By @Naktibalda.
* [Asserts] Add delta parameter to `assertEquals()` `assertNotEquals()` methods by @spideyfusion
* [Yii2] Removed check and notification for environment other than `test` by @samdark
* [Yii2] Unload fixtures only if `cleanup` configuration equals true. #4207 by @Faryshta
* [ZF2] Removed `session_write_close()` from ZF2 module by @tasselchof. Fixes #4112
* Fixed textual representation of can't steps by @Naktibalda
* [Lumen] Added IoC methods from Laravel5 module: `haveBinding`, `haveSingleton`, `haveContextualBinding`, `haveInstance`, `haveApplicationHandler`, `clearApplicationHandlers`. By @kt81
* [Lumen] Clear facade cache only when facade exists. Same change as #3124 for refactored Lumen module by @kt81
* [ZendExpressive] Support Zend Expressive 2.0 by @Naktibalda
* [Doctrine2] `haveFakeRepository` updated to work with Doctrine >= 2.5.7 by @laszlo-karpati #4212
* Command `bootstrap` adds `support/_generated` to gitignore. By @Naktibalda
#### 2.2.10
* Prefer local composer installation if available. Solves issues with incompatibility between locally and globally installed or packaged in phar file Codeception dependencies. Fix by @Naktibalda See #3997
* Added console completion by @gdscei. See [documentation](http://codeception.com/docs/07-AdvancedUsage#Shell-autocompletion)
* [WebDriver] Fixed compatibility with `facebook/webdriver` 1.4.0 by @Naktibalda. See #4076 Fixes #4073
* Run a suite by its path #4079
```
codecept run tests/unit
```
Improves recent [PHPStorm integration](https://blog.jetbrains.com/phpstorm/2017/03/codeception-support-comes-to-phpstorm-2017-1/). Codeception tests can be started by running a suite directory.
* [WebDriver] Fixed using `performOn` with `ActionSequence`; supporting multiple actions of same kind. #4066 by @davertmik. Fixes #4044
* [Laravel5] Added `haveApplicationHandler` and `clearApplicationHandlers` methods. See #4068. By @janhenkgerritsen
* [Laravel5] Close all Laravel DB connections after test execution. Fixes #4031 by @rmblstrp
* [Laravel5] Update Laravel5 `database_migrations_path` to by null by default by @timbroder. Fixes #3990
* [DataFactory] Add `cleanup` option to skip auto cleanup. By @alexpts. See #3996
* Fixed printScenarioFail with multiple feature scenarios by @gimler. See #3868
* Fixed generating JUnit XML when Selenium server can’t be connected. Closes #3653 by @Naktibalda
* Fixes running local suites (under tests folder) and included suite mixed (via include path). See #4063
* [Db] Run the last statement in dump file even if it doesn't end with delimiter. #4071 by @Naktibalda. Fixes #4059
* [Memcache] Fixed calling flush on null by @Jurigag. See #4074
* [Yii2] Fixtures behavior compatibility with `yii2-codeception` by @leandrogehlen. See #4016
* `g:suite` allows generate suites with uppercase names. Fixes #4072
* Enabled incomplete/skipped/risky/warning settings for logger. See #3890. By @mario-naether
```yaml
settings:
report_useless_tests: false
disallow_test_output: false
be_strict_about_changes_to_global_state: false
log_incomplete_skipped: false
```
* [WebDriver] Fixed double coverage cookie check by @boboldehampsink. See #2923 #4020
* [WebDriver] Fixed `switchToIframe` regression from 2.2.9 by @lcobucci. PR #4000
* Speed improvement for group lookup by @pitpit. See #4025
* Added parse error to `TestParseException` in PHP7 by @Naktibalda. See #4007
* Auto injection for `Codeception\Test\Unit` format #4070. Allows to customize injection of support objects into a testcase:
```php
i = $unit;
}
```
#### 2.2.9
* [Laravel5] **Laravel 5.4 support** by @janhenkgerritsen
* [WebDriver] Added `performOn` to wait for element, and run actions inside it. See [complete reference](http://codeception.com/docs/modules/WebDriver#performOn). #3986
* [WebDriver] Improved error messages for `wait*` methods by @disc. See #3983
* [REST] Binary responses support by @spikyjt #3993 #3985
* `seeBinaryResponseEquals` assert that binary response matches a hash
* `seeBinaryResponseEquals` assert that binary response doesn't match a hash
* hide binary response on debug
* [Laravel5] module fix error for applications that do not use a database. See #3954 by @janhenkgerritsen. Fixed #3942
* [Laravel5] database seeders to be executed inside a transaction. See #3954 by @janhenkgerritsen. Fixed #3948 by @janhenkgerritsen
* [Yii2] reverted #3834, closing transaction after each request. #3973 by @iRipVanWinkle. Fixes #3961
* Added crap4j report support. Use `--coverage-crap4j` option and `codeception/c3` 2.0.10
* [PhpBrowser][Frameworks] If form has no id, use action attribute as identifier by @Naktibalda. Fixes #3953
* Fixed test coloring output when a Feature title has some special chars in it like `/` or `-`
* [REST] Added missing @part `json` and `xml` to `deleteHeader` by @freezy-sk
#### 2.2.8
* [WebDriver] Added tab actions (not supported in PhantomJS):
* `openNewTab` opens a new tab and switches to it
* `closeTab` closes a tab and switches to previous
* `switchToNextTab` switches to next tab
* `switchToPreviousTab` switches to previous tab
* [WebDriver] Added actions to click element by coordinates. Via @gimler
* `clickWithLeftButton` clicks element with offset
* `clickWithRightButton` right clicks on element with offset
* [WebDriver] Added `js_error_logging` option to print JS logs in console and in HTML report by @ngraf. See #3821
* [WebDriver] Improvements to `seeInField` by @gimler. See #3905
* support option text in seeInField not only value
* fix bug match with and without whitespaces
* fix bug seeInField not working after selectOption
* [Wedriver] `pageload_timeout` config option added. The amount of time to wait for a page load to complete before throwing an error. This patch allows to reduce issues from phantomjs random freezing. See #3874. Thanks to @oprudkyi
* [WebDriver] `checkOption` can check option by name #3852. By @gimler
* [WebDriver] Fixed clicking numerical links, like `222` (DOM Exception 12 errors). See #3865. By @gimler
* [PhpBrowser][Frameworks] Fixed #3824 when submitForm used wrong value for `select` by @JorisVanEijden
* [Laravel5] Added `seeNumRecords` and `grabNumRecords` methods. See #3816. By @dmoreno
* Improved `@depends` to work with `@dataprovider`. Fixes #3862. Thanks @edno
* Fixed relative paths for screenshots in HTML report. Fixes #3857
* Improved error description when injecting invalid classes by @timtkachenko
* Improved `--override` option to support deep configs. See #3820
* [Yii2] Clear unloaded fixtures after test. Closes #3794
* [PhpBrowser] Ensure sessions have independent cookies by @insightfuls. Fixes #3911
* Implemented load params from php files by @arrilot. See #3914
* [Yii2] Fixes #3916: Don't try to start transaction when working with non-transactional DBs by @samdark.
* [REST] Removed broken xdebug_remote functionality by @Naktibalda. Fixes #3883
* Added graceful termination by Ctrl-C in PHP 7.1 by @AdrianSkierniewski. See #3907
* [Db] Disconnect after initializing when using reconnect, fixes #3903. By @insightfuls
* [Phalcon] Fixed handling `$_SERVER` with Phalcon Connector by @sergeyklay
* Avoid notice when checking width of terminal on Windows by @ashnazg. See #3893
* [Filesystem] `dontSeeFileFound` searches in path by @Naktibalda. Fixes #3877
* [PhpBrowser][Frameworks] `grabValueFrom` to work after `fillField` by @wumouse. Fix #3866
* [Db] Oci driver to cleans up views #3881, and result set improvements #3840 by @ashnazg.
* [Yii2] Close transaction created by the controller-action on interruption. See #3834. By @alex20465
* [Yii2] Fixed using `part: init` with other modules like WebDriver. See #3876. By @margori
* [REST] Implemented `dontSeeResponseJsonMatchesXpath` method by @Naktibalda. Closes #3843
* [REST] Convert array having single element to XML correctly. Fixes #3827 by @Naktibalda
* Linter to check `exec` function to be enabled before using it. By @Naktibalda. See #3886
* Fixed #3922: division by zero in steps output on small terminal windows.
* Improved getting terminal width from ENV variable (bash). Fixes #3788 by @schmunk42
#### 2.2.7
* **Config validation** with `codecept config:validate` command. Use it:
```
codecept config:validate
codecept config:validate acceptance
```
This should help you next time you get messed with YAML formatting.
* Gherkin improvements:
* multiple step definitions per method allowed (Fixes #3670).
* regex validation for Gherkin steps; throws exception if invalid regex passed. Fixes #3676
* currency chars supported in placeholders:
$,€,£ and other signs can be used before or after a number inside Gherkin scenario. This char will be ignored inside a PHP variable, so you receive only number.
```gherkin
When I have 100$ => $num === 100
And I have $100 => $num === 100
```
* escaped strings can now be passed into placeholders. Fixes #3676.
* Codeception is tested with latest verision of HHVM
* Extensions loader refactored:
* Extensions can be **enabled for suite** in suite config.
* Extensions can be loaded per suite and per environment.
* Extensions configs can be done inside `enabled` section (as it is for modules):
```yaml
extensions:
enabled:
Codeception\Extension\Recorder:
delete_successful: false
```
* **Added dataprovider to Cest** format by @endo. See [updated documentation](http://codeception.com/docs/07-AdvancedUsage#Examples).
* Params loader refactored. Using `vlucas/phpdotenv` to parse .env files. Please install it if you don't have it yet.
* Improved `generate:suite` command to generate actor file for suite.
* HTML reporter: snapshot and screenshots paths made relative to make them accessible on CI. Fixes #3702
* [WebDriver] added `protocol` and `path` config options by @sven-carstens-udg. See #3717
* [PhpBrowser][Frameworks] Honour `` meta tag by @Naktibalda. See #3764
* [Yii2] Removed mockAssetManager by @githubjeka
* [Yii2] Added procesing for native url formats of Yii2 #3725 by @githubjeka
* [Yii2] Fixed unintentional DB connection drop during exception logging, #3696 by @ivokund
* [Yii2] Fixed calling `_fixtures()` method of Cest class. See #3655, fixes #3612 by @primipilus
* [Db] Fixed `removeInserted` for Sqlite by @Naktibalda. Fixes #3680
* Allows to get groups from scenario by `$scenario->getGroups()`. By @frantzen. See #3675
* Fixed #3225: incorrect steps shown for multiple canXXX conditional assertion failures. By @Mitrichius
* [SOAP] Force string for debugSection output by @Noles. Fixes #3690
* Fixed #3562 group files with exact test not working with `@example` on Windows by @Naktibalda.
* [Laravel5] Added `vendor_dir` option. See #3775. By @AdrianSkierniewski
* [Laravel5] Fixed error where custom service container bindings were not available on the first request. See #3728. By @janhenkgerritsen
* [Lumen] Fixed error where a non-existing exception class was thrown. See #3729. By @janhenkgerritsen
* [Phalcon] Added `services` part which can be used to `grabServiceFromContainer` and `addServiceToContainer` when conflicting module is used. By @sergeyklay
* [Phalcon] **Refactored**. Moved in-memory session adapter to the separated namespace. By @sergeyklay
* [Phalcon] Fixed overwriting server parameters on requests. By @sergeyklay
* [Asserts] `assertCount` method added by @disc
* Documentation improvements by @CJDennis
#### 2.2.6 (October 2016)
* Ability to update config on run with `--override` (`-o`) option. Usage Examples:
* `codecept run -o "settings: shuffle: true"`: enable shuffle
* `codecept run -o "settings: lint: false"`: disable linting
* [WebDriver] **HTML report to include screenshots of failed tests.** See #3602
* [PhpBrowser][Frameworks] HTML report to include HTML of failed tests. See #3602
* [Apc] **Module added** to interact with the Alternative PHP Cache (APC) using either APCu or APC extension. By @sergeyklay
* [Laravel5] Add `run_database_seeder` configuration option. See #3625 and #3630. By @Bouhnosaure
* [Laravel5] Add `database_migrations_path` configuration option. See #3628. By @janhenkgerritsen
* [Laravel5][Lumen] Fixed issue that caused the `have` and `haveMultiple` methods not being available when using the ORM part of the modules. See #3587. By @janhenkgerritsen
* [PhpBrowser][Frameworks] Fixed clicking on a button inside the link
* [PhpBrowser][Frameworks] Click on the first clickable item when clickBySelector is used
* [PhpBrowser][Frameworks] Anchor is no longer sent to server
* Removed tags from `see`/`dontSee` output and friends output
* `--` separates options from arguments in `codecept run` by @Naktibalda. Fixes #3614. See #3615
* Fixed terminating run process with Ctrl-C for PHP 7.0. Disabled graceful termination
* [Yii2] fixed Yii2 logging complex data by @svoboda2010 Fixes #3452
* [Yii2] `cleanup` set to true by default (as it was documented but not enabled).
* [Yii2] Close db connections when running `haveFixtures` by @Ni-san. Fixes #3456. See #3586
* [Yii2] Fixed loading fixtures from `_fixtures` method in testcase by @iRipVanWinkle. See #3565
* [MongoDb] Added support for [mongofill](https://github.com/mongofill/mongofill), an alternative Mongo client in pure PHP. By @hlogeon at #3641
* [MongoDb] Fixed data import using mongotype dump type by @hlogeon #3637
* Fixed #3392 by normalizing namespace loading classes in DI getterby @Mitrichius at #3633
* [Symfony] Fixed #3608 `[PHPUnit_Framework_Exception] implode()` while printing debug for security roles by @Prazmok.
* [Yii1] Fix domain regex #3581 to return correct value by @amashigeseiji See #3597
* [WebDriver] Improved tests stability when Selenium server is gone #3534 by @eXorus. Fixes #3531
* [WebDriver] Tests are errored when Selenium server can't be connected. See #3603
* MetaSteps are printed even with disabled xdebug by @niclopez. See #3600
* [WebDriver] submit button in `submitForm` can be located by name or strict locator by @imjoehaines. See #3560
* [SOAP][REST] removed module conflict by @eXorus.
* Fixed #3571: error handler to call `registerDeprecationErrorHandler` method and `register_shutdown_function` on first SuiteEvent only. By @positronium. See #3572
#### 2.2.5 (September 2016)
* Support for PhpUnit 5.x.
* [Lumen] Major refactoring of Lumen module. See #3533. By @janhenkgerritsen
* [Laravel5] Removed calls to `Auth::logout()`, `Session::flush()` and `Cache::flush()` from after hook. See #3493. By @janhenkgerritsen
* [Memcache] Updated `Memcache::seeInMemcached` to check if the key exists alone or with the desired value. By @sergeyklay
* [Memcache] Added `Memcache::haveInMemcached`. By @sergeyklay
* [Memcache] Fixed `Memcache::dontSeeInMemcached`. By @sergeyklay
* [ZF2] Zend Framework 3 Support. Made `init_autoloader` optional, because ZF3 uses composer for autoloading #3525. By @Naktibalda
* [ZF2] Fixed accessing Doctrine Entity Manager when client is not initialized. By @chris1312. See #3524
* [Yii2] Allow to load fixtures from `_fixtures` method of a testcase. [See reference](http://codeception.com/docs/modules/Yii2#Fixtures). Fixes usage of nested transactions #3520. By @kalyabin and @davertmik
* [Yii1] Fix private property accessible; allows to change urlManager class to subclass of CUrlManager. See @3287. By @amashigeseiji
* Escaped tags in debug output by @Naktibalda. See #3507. Fixes #3495
* Fixed #3410: Wrong subSteps rendering in HTML ResultPrinter by @niclopez
* [WebDriver] Improved exception message thrown when click('name') does not match any element #3546 by @Naktibalda. Fixes #3528
* [SOAP] Removed conflict with REST module. `seeResponseCodeIs` is deprecated in favor of `seeSoapResponseCodeIs` by @eXorus. See #3512. Fixes #3512
* Fixed #3472: group Files not working with a non-empty data provider by @eXorus
* [REST] Disabled resetting server parameters in _before. Fixed REST+Laravel usage: #3263. See #3539. By @janhenkgerritsen
* [REST] Improved output of failed JsonType assertions #3480. By @Naktibalda. Fixes #2858
* [REST] Requests are added to browser history #3446. Fixes regression #3197. By @Naktibalda
* [REST] application/json header check made case insensitive. Fixes #3516. By @Naktibalda
* Fix bug in Coverage Filter related to relative filepaths #3518. By @sbacic
* [Db] PostgreSQL: fixed a problem when sequences are not a standard format (ie. table_id_seq). See #3506. By @alexjeen
* [Symfony] Persist doctrine.dbal.backend_connection if Doctrine2 module is used #3500. Fixes #3479. By @Naktibalda
* [Doctrine2] Using `Doctrine\ORM\EntityManagerInterface` as valid em instance #3467. Fixes #3459. By @akbwm
* [MongoDb] Fixes `mongorestore` command syntax and adds --quiet option to config
* [Facebook] Replaced `facebook/php-sdk-v4` library with `facebook/graph-sdk`.
* Fixed #3433 detection of relative path when `codeception.yml` is not in project root. See #3434. By @loren-osborn
* Handle deprecation messages according to `error_level` setting #3460. Fixes #3424. By @Naktibalda.
#### 2.2.4 (August 2016)
* Improved using complex params, nested params can be set using dot (`.`). See #3339
* [Yii2] Mailer mock is now configured with options that make sense for it. Fixes #3382
* [Yii2] Fixed creating `@webroot` directory on running functional tests. See #3387
* [Yii2] Fixed regression in Yii 2 connector not allowing to work with output of error pages in functional tests. Fixes #3332
* [Mongo] support of standard mongodump/mongorestore tools to populate mongo db database. Thanks @GSokol. Fixes #3427
* [REST] `seeResponseIsJson` fails when response is empty. See #3401, closes #3400
* [AMQP] Added `purgeQueue` and `purgeAllQueues` actions. By @niclopez
* [DataFactory] `haveMultiple` fixed; corrected the order of arguments in `FactoryMuffin->seed`. See #3413 by @buffcode
* [SOAP] Improved error reporting by @eXorus See #3426 #3422
* [SOAP] Added `SOAPAction` config param to unset `SOAPAction` header in SOAP >= 1.2. See #3396
* [REST] fixed digest authentication. See #3416
* [Laravel5] Fixed an issue with error handling for Laravel 5.3. See #3420. By @bonsi.
* [Laravel5] Fixed an issue with uploaded files. See #3417. By @torkiljohnsen.
* [ZF2] Support for zend-mvc 3.0
* [Db] Error is thrown if SQLite memory is used. #3319
* [Frameworks] `REQUEST_TIME` server variable to be set on request. By @gimler. Fixes #3374
#### 2.2.3 (July 2016)
* [Yii2] Improvements:
* Added `init` part to initialize Yii app for unit and acceptance testing.
* added `entryScript` and `entryUrl` config values for acceptance testing.
* Fixtures support: `haveFixtures`, `grabFixtures` methods.
* Yii logs to be printed in debug mode.
* added `amOnRoute` method.
* added `amloggedInAs` method.
* added `grabComponent` method.
* added `seeEmailIsSent`, `grabLastSentEmail`, etc and email part.
* assetManager disabled for unit/functional tests.
* Fixed `@example` to `@group` defined in group files. By @eXorus. Fixes #3278
* Added `ReqiuiresPackage` interface to set external dependencies for modules.
* Fixed timing values in output. Closes #3331
* Fixed merging module configs. Closes #3292
* [Recorder Extension] Fixes saving of files on windows and with using examples.
* [DataFactory] Fixed loading factories twice by @samusenkoiv. See #3314
* [Laravel5] Added `run_database_migrations` configuration option. By @janhenkgerritsen.
* [Laravel5] Added `callArtisan` method. By @janhenkgerritsen.
* [Laravel5] Added `disableModelEvents()` method and `disable_model_events` configuration option. Fixes #2897.
* [REST] Allow objects in files array #3298
* [ZF2] Added addServiceToContainer method
* [ZendExpressive] allow instances of UploadedFile in files array
* [ZF2] Added addServiceToContainer method
* Don't fail test validation when exec function is disabled by @Naktialda
#### 2.2.2
* Parameters can be applied to global `codeception.yml` config. See #3255 Thanks to @LeRondPoint
* Fixed loading of parameters from `.env.*` files. See #3224. By @smotesko
* Better failure diff messages by @k0pernikus
* UTF-8 improvements (replaced with custom `ucfirst`, `strtoupper` => `mb_strtoupper`) by @Naktibalda. See #3211
* Print execution time of non-successful tests by @Naktibalda. Fixes #3274
* [WebDriver][PhpBrowser][Frameworks] Fixed created files on failure. Fixes #3207
* [Frameworks][PhpBrowser] Adjacent forms submit improvements by @dizzy7. Fixes #2331
* [WebDriver] Fixed adjacent `selectOption` with similar options by @eXorus. Fixes #3246
* [DataFactory] fixed loading factories from relative paths. Fixes #3208
* *Test\Gherkin* Added JUnit reporter #3273
* *Test\Gherkin* Added support for multiple languages by @dizzy7. See #3203
* *Test\Unit* Dependencies can pass and receive values the same way as it is done in PHPUnit. Fixes #3213
* [Symfony] Fixed failing tests when the profiler is disabled by @dizzy7. See #3223
* [REST] Added `Codecepion\Util\HttpCode` util class with HTTP code constants. See [class reference](https://github.com/Codeception/Codeception/blob/2.2/docs/reference/HttpCode.md)
* [REST] Support simple key-value format for file uploads. See #3244
* Bugfix with duplicate instances in the modules container #3219 by @dizzy7
* [REST] Added `deleteHeader` method by @Naktibalda. Fixes #3161
* [Yii1] `init` part added to avoid conflicts with `WebDriver`
* `generate:snippets` can accept second parameter to generate snippets from a specific file or folder.
* [Db] Added `grabNumRecords` method by @tocsick. See #3175
* Fixed group events fire twice #3112. By @jstaudenmaier
* [ZF2] Added services part which can be used to `grabServiceFromContainer` when conflicting module is used by @Naktibalda.
* Improved Examples to be Traversable; Fixed console output for complex data structures.
* [Laravel5] Added `haveBinding`, `haveSingleton`, `haveContextualBinding` and `haveInstance` methods. By @janhenkgerritsen. See #2904.
* + changes from 2.1.11
#### 2.2.1
* PHPUnit 5.4 and PHPUnit/php-code-coverage 4.0 compatibility.
#### 2.2.0
* **Gherkin format support**. [Announcement](https://github.com/Codeception/Codeception/pull/2750#issue-129899745)
* **Core Test Format Refactorings** Codeception becomes true multiformat testing platform. Format requires a [Loader](https://github.com/Codeception/Codeception/blob/master/src/Codeception/Test/Loader/LoaderInterface.php) and class extending [Test](https://github.com/Codeception/Codeception/blob/master/src/Codeception/Test/Test.php) class, implementing [TestInterface](https://github.com/Codeception/Codeception/blob/master/src/Codeception/TestInterface.php).
* *Breaking* `Codeception\TestCase` replaced with `Codeception\TestInterface` in code and in module signatures.
* *Breaking* Cept/Cest classes are no longer extending `PHPUnit_Framework_TestCase`, so they don't have `expectException`, `getMock`, etc.
* Reduced stack trace for scenario-driven test formats. Codeception tests implement `PHPUnit_Framework_Test` instead of extending heavy `PHPUnit_Framework_TestCase` class.
* *Breaking* **Conflicts API implemented** Frameworks + PhpBrowser + WebDriver can't be used together unless only non-conflicting part is used. [Announcement](http://codeception.com/03-05-2016/codeception-2.2.-upcoming-features.html#conflicts)
* **Examples** as an alternative to Data Providers. [Announcement](http://codeception.com/03-10-2016/even-more-features-of-codeception.html#examples)
* **Params** loading from yml, env files or environment. [Announcement](http://codeception.com/03-05-2016/codeception-2.2.-upcoming-features.html#params)
* **Test dependencies** with `@depends` annotation. [Announcement](http://codeception.com/03-05-2016/codeception-2.2.-upcoming-features.html#test-dependencies)
* **Custom Commands** inject your own commands as as simple as extension. [Announcement](http://codeception.com/03-10-2016/even-more-features-of-codeception.html#custom-commands)
* `codecept dry-run` command added to show scenario steps without executing them.
* *Breaking* [Dbh] module removed
* *Breaking* [Laravel4] module removed. See #2866
* *Breaking* [Laravel5] Minimum supported Laravel version is 5.1. See [#3243](https://github.com/Codeception/Codeception/issues/3243#issuecomment-227078266)
* *Breaking* [Laravel5] Removed `createModel` method, use `have` method instead. See #2866
* *Breaking* [Laravel5] Removed `makeModel` method. See #2866
* *Breaking* [Laravel5] Renamed `haveModel` method to `have`. See #2866
* *Breaking* [Symfony] public property `container` removed
* *Breaking* [Asserts] removed deprecated `assertLessThen` and `assertGreaterThen`
* *Breaking* mocks created with `Codeception\Util\Stub` are not verified in Cests. See #3005
* *Breaking* [REST] `grabAttributeFrom` renamed to `grabAttributeFromXmlElement` to avoid conflicts
* [WebDriver] allows getting current browser and capabilities in test. [Announcement](http://codeception.com/03-10-2016/even-more-features-of-codeception.html#Getting-current-browser-and-capabilities-in-tests)
* [AngularJS] module added. Extends WebDriver module for AngularJS testing. [Announcement](http://codeception.com/03-10-2016/even-more-features-of-codeception.html#angularjs)
* [DataFactory] module added. Performs data generation using FactoryMuffin library [Announcement](http://codeception.com/03-10-2016/even-more-features-of-codeception.html#datafactory)
* [Redis] Module rewritten using Predis library as driver by @marcverney
* [Laravel5] Added a `haveMultiple` method to create more than one model per call. See #2866
* [Laravel5] [Lumen] The `haveRecord`, `seeRecord`, `dontSeeRecord` and `grabRecord` methods now also accept Eloquent model class names instead of only database table names. See #2866
* [Symfony] module Symfony2 renamed to Symfony
* [Phalcon] Merged `Phalcon1` and `Phalcon2` modules into one `Phalcon` due the fact that Phalcon Framework v1.3.x no longer supported at all
* [Asserts] More `assert*` methods from PHPUnit added
* [Asserts] Added `expectException` method
* [WebDriver][Frameworks][PhpBrowser] `selectOption` can receive option as strict locator to exactly match option by text or by value. Use `['value' => 'myvalue']` or `['text' => 'optiontext']` to select a proper option. By @gdscei and @davertmik See #3003
* Added config option to disable modules using `modules: disabled:`.
* [Sequence] Changed the prefix value. Generated sequences to include id inside a prefix: `sq('user1') => 'user1_876asd8as87a'. Added `prefix` config option.
* Deprecation errors won't fail tests but will be printed.
* Official [Docker image](https://hub.docker.com/r/codeception/codeception/) introduced by @schmunk42
PK &?V[od d CONTRIBUTING.mdnu W+A # How to contribute
At Codeception we are glad to receive contributions and patches from the community. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
Please check the guide for sending your contributions with Github at
https://github.com/Codeception/Codeception/wiki/Git-workflow-for-Codeception-contributors
## Coding Standards
All contributions must follow [PSR-2](http://www.php-fig.org/psr/psr-2/) coding standard.
## Code
**Bugfixes should be sent to to current stable branch, which is the same as major version number.**
Breaking features and major improvements should be sent into `master`. When you send PRs to master, they will be added to release cycle only when the next stable branch is started.
## Tests
Check the [tests/README.md](tests/README.md) to learn how to run and write internal tests.
We encourage you to write a test for a patch you are implementing. If this doesn't seem possible, such PRs are stil valid and can be accepted.
We also encourage to submit bug reports with a failing test or test environment (3rd party repo with Codeception installation) with demonstration of a failure. That makes easier to us to find the cause and fix it.
## Documentation
### Guides
If you want to contribute documentation to the guides you are asked to send your changes to the /docs/ folder: https://github.com/Codeception/Codeception/tree/2.2/docs. Theses files are the source for the codeception website guides: http://codeception.com/docs/01-Introduction. Remind to send your documentation improvements to the right "repository branch" depending on the Codeception version you are working with: 2.2, master,...
### Modules Documentation
The documentation for each module is directly generated from the corresponding docblock which can be found in each module (src/Codeception/Module/*.php).
PK &?V<= = wercker.ymlnu W+A box: hhvm/hhvm-proxygen:3.18-lts-latest
# Build definition
build:
# The steps that will be executed on build
steps:
- script:
name: disable interactive install
code: |
export DEBIAN_FRONTEND=noninteractive
- install-packages:
packages: curl git mysql-server redis-server postgresql
- script:
name: start database servers
code: |
/etc/init.d/mysql start
/etc/init.d/redis-server start
sed -i "s/ peer/ trust/g" /etc/postgresql/*/main/pg_hba.conf
sed -i "s/ md5/ trust/g" /etc/postgresql/*/main/pg_hba.conf
/etc/init.d/postgresql start
- script:
name: install composer
code: |
rm -f composer.lock
export COMPOSER_CACHE_DIR=$WERCKER_CACHE_DIR
curl -sS https://getcomposer.org/installer | hhvm --php -- --install-dir=/usr/local/bin/
composer.phar remove mongodb/mongodb --no-update --dev
composer.phar install
echo "xdebug.enable = On" >> /etc/hhvm/php.ini
- script:
name: setup HHVM servers
code: |
echo ${WERCKER_ROOT}/tests/data/app
echo "hhvm.server.source_root=${WERCKER_ROOT}/tests/data/app" >> tests/data/app/hhvm-server.ini
cat tests/data/app/hhvm-server.ini
hhvm -m server -c tests/data/app/hhvm-server.ini -c /etc/hhvm/site.ini &
echo "hhvm.server.source_root=${WERCKER_ROOT}/tests/data/rest" >> tests/data/rest/hhvm-server.ini
hhvm -m server -c tests/data/rest/hhvm-server.ini -c /etc/hhvm/site.ini &
- script:
name: prepare databases
code: |
mysql -e 'create database codeception_test;'
su postgres -c "psql -c 'create database codeception_test;' -U postgres"
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: codeception CLI tests
code: |
php codecept run cli RunCest
- script:
name: codeception unit tests
code: |
php codecept run unitPK &?VT<
W ISSUE_TEMPLATE.mdnu W+A #### What are you trying to achieve?
#### What do you get instead?
> Provide console output if related. Use `-vvv` mode for more details.
```bash
# paste output here
```
> Provide test source code if related
```php
// paste test
```
### Details
* Codeception version:
* PHP Version:
* Operating System:
* Installation type: Phar || Composer
* List of installed packages (`composer show`)
* Suite configuration:
```yml
# paste suite config here
```
PK &?VvR5 .travis.ymlnu W+A sudo: false
language: php
matrix:
fast_finish: true
php:
- 5.6
- 7.0
- 7.1
- 7.2
env:
global:
- XDEBUG=
- SUITES=
- FXP=
- PECL=
- TEST_PATH='framework-tests'
- SYMFONY_DEPRECATIONS_HELPER=weak
matrix:
- FRAMEWORK=Codeception SUITES=cli,unit TEST_PATH=. XDEBUG=1 PECL=mongodb
- FRAMEWORK=Yii2 TEST_REPO="https://github.com/Codeception/yii2-tests"
- FRAMEWORK=Symfony VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle
- FRAMEWORK=Symfony VERSION=3.4 TEST_REPO='--recurse-submodules https://github.com/Naktibalda/codeception-symfony-tests'
- FRAMEWORK=Symfony VERSION=4 TEST_REPO='https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit
- FRAMEWORK=Lumen TEST_REPO='-b codeception-2.2 https://github.com/codeception/codeception-lumen-sample.git'
- FRAMEWORK=Laravel TEST_REPO='-b codeception-2.3 https://github.com/codeception/codeception-laravel5-sample.git'
- FRAMEWORK=Phalcon TEST_REPO=https://github.com/Codeception/phalcon-demo.git
- FRAMEWORK=Zend1 TEST_REPO='-b 2.2 --recurse-submodules https://github.com/Naktibalda/codeception-zf1-tests'
- FRAMEWORK=Zend2 TEST_REPO='-b 2.2 --recurse-submodules https://github.com/Naktibalda/codeception-zf2-tests' SUITES=functional
- FRAMEWORK=ZendExpressive TEST_REPO='-b 2.2 --recurse-submodules https://github.com/Naktibalda/codeception-zend-expressive-tests' SUITES=functional
matrix:
include:
- php: 7.1
env: FRAMEWORK=Codeception SUITES=cli,unit,coverage TEST_PATH=. XDEBUG=1 PECL=mongodb
exclude:
- php: 7.1
env: FRAMEWORK=Codeception SUITES=cli,unit TEST_PATH=. XDEBUG=1 PECL=mongodb
- php: 7.0
env: FRAMEWORK=Symfony VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle
- php: 7.1
env: FRAMEWORK=Symfony VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle
- php: 7.2
env: FRAMEWORK=Symfony VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle
- php: 5.6
env: FRAMEWORK=Symfony VERSION=3.4 TEST_REPO='--recurse-submodules https://github.com/Naktibalda/codeception-symfony-tests'
- php: 7.0
env: FRAMEWORK=Symfony VERSION=3.4 TEST_REPO='--recurse-submodules https://github.com/Naktibalda/codeception-symfony-tests'
- php: 5.6
env: FRAMEWORK=Symfony VERSION=4 TEST_REPO='https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit
- php: 7.0
env: FRAMEWORK=Symfony VERSION=4 TEST_REPO='https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit
# - php: 7.1
# env: FRAMEWORK=ZendExpressive TEST_REPO='-b 2.2 --recurse-submodules https://github.com/Naktibalda/codeception-zend-expressive-tests' functional
# - php: 7.2
# env: FRAMEWORK=ZendExpressive TEST_REPO='-b 2.2 --recurse-submodules https://github.com/Naktibalda/codeception-zend-expressive-tests' functional
addons:
postgresql: "9.2"
branches:
except:
- gh-pages
cache:
directories:
- vendor
- $HOME/.composer/cache
services:
- mongodb
- rabbitmq
- postgresql
- redis
before_install:
- '$(php PruneTest.php)'
- '[[ !(-z "$XDEBUG") ]] || phpenv config-rm xdebug.ini'
- export INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo memory_limit = -1 >> $INI
install:
- '[[ -z "$CI_USER_TOKEN" ]] || composer config github-oauth.github.com ${CI_USER_TOKEN};'
# Add extensions
- '[[ -z "$PECL" ]] || (yes "" | pecl install -f $PECL)'
# Clone test repository
- '[[ "$FRAMEWORK" == "Codeception" ]] || git clone -q --depth=1 $TEST_REPO framework-tests'
- '[[ "$FRAMEWORK" == "Codeception" ]] || git --git-dir framework-tests/.git log -n 1'
- '[[ "$FRAMEWORK" != "Codeception" ]] || composer require mongodb/mongodb --no-update'
- '[[ -z "$FXP" ]] || composer global require "fxp/composer-asset-plugin:~1.3.1"'
- '[[ "$FRAMEWORK" != "Symfony" ]] || composer require symfony/finder=~$VERSION --no-update --ignore-platform-reqs'
- '[[ "$FRAMEWORK" != "Symfony" ]] || composer require symfony/yaml=~$VERSION --no-update --ignore-platform-reqs'
- '[[ "$FRAMEWORK" != "Symfony" ]] || composer require symfony/console=~$VERSION --no-update --ignore-platform-reqs'
- '[[ "$FRAMEWORK" != "Symfony" ]] || composer require symfony/event-dispatcher=~$VERSION --no-update --ignore-platform-reqs'
- '[[ "$FRAMEWORK" != "Symfony" ]] || composer require symfony/css-selector=~$VERSION --no-update --ignore-platform-reqs'
- '[[ "$FRAMEWORK" != "Symfony" ]] || composer require symfony/dom-crawler=~$VERSION --no-update --ignore-platform-reqs'
- '[[ "$FRAMEWORK" != "Symfony" ]] || composer require symfony/browser-kit=~$VERSION --no-update --ignore-platform-reqs'
- '[[ "$FRAMEWORK" != "Symfony" ]] || composer require symfony/browser-kit=~$VERSION --no-update --ignore-platform-reqs'
# Phalcon
- '[[ "$FRAMEWORK" != "Phalcon" ]] || git clone -q --depth=1 https://github.com/phalcon/cphalcon.git'
- '[[ "$FRAMEWORK" != "Phalcon" ]] || (cd cphalcon/build; bash ./install --phpize $(phpenv which phpize) --php-config $(phpenv which php-config) &>/dev/null && phpenv config-add ../tests/_ci/phalcon.ini &> /dev/null)'
# Symfony
#- '[[ "$FRAMEWORK$VERSION" != "Symfony3" ]] || composer require -d framework-tests symfony/symfony=~$VERSION --no-update'
- '[[ -z "$FRAMEWORK" ]] || composer install'
- '[[ "$FRAMEWORK" == "Codeception" ]] || [[ -z "$FRAMEWORK" ]] || composer update -d framework-tests --no-dev --prefer-dist'
before_script:
- '[[ "$TRAVIS_PHP_VERSION" == 7.* ]] || echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini'
# preparing databases
- '[[ "$FRAMEWORK" != "Codeception" ]] || mysql -e "create database codeception_test;"'
- '[[ "$FRAMEWORK" != "Codeception" ]] || psql -c "create database codeception_test;" -U postgres'
- '[[ "$FRAMEWORK" != "Symfony" ]] || mysql -e "create database symfony_test;"'
# starting demo servers
- '[[ "$FRAMEWORK" != "Codeception" ]] || php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &'
- '[[ "$FRAMEWORK" != "Codeception" ]] || php -S 127.0.0.1:8010 -t tests/data >/dev/null 2>&1 &'
# Phalcon
- '[[ "$FRAMEWORK" != "Phalcon" ]] || mysql -e "CREATE DATABASE phalcon_demo CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;"'
- '[[ "$FRAMEWORK" != "Phalcon" ]] || cat framework-tests/schemas/phalcon_demo.sql | mysql phalcon_demo'
# Laravel 5
- '[[ "$FRAMEWORK" != "Laravel" ]] || touch framework-tests/storage/testing.sqlite'
- '[[ "$FRAMEWORK" != "Laravel" ]] || php framework-tests/artisan migrate --env=testing --database=sqlite_testing --force'
# Lumen
- '[[ "$FRAMEWORK" != "Lumen" ]] || cp framework-tests/.env.testing framework-tests/.env'
- '[[ "$FRAMEWORK" != "Lumen" ]] || touch framework-tests/storage/testing.sqlite'
- '[[ "$FRAMEWORK" != "Lumen" ]] || php framework-tests/artisan migrate --database=testing --force'
# Symfony
- '[[ "$FRAMEWORK$VERSION" != "Symfony2.8" ]] || php framework-tests/app/console doctrine:schema:create -n --env test'
- '[[ "$FRAMEWORK$VERSION" != "Symfony2.8" ]] || php framework-tests/app/console doctrine:fixtures:load -n --env test'
- '[[ "$FRAMEWORK$VERSION" != "Symfony3.4" ]] || php framework-tests/bin/console doctrine:schema:update --force -n'
# ZF2
- '[[ "$FRAMEWORK" != "Zend2" ]] || mysql -e "create database zf2_test;"'
- '[[ "$FRAMEWORK" != "Zend2" ]] || php framework-tests/vendor/bin/doctrine-module orm:schema-tool:create'
# Build
- '[[ -z "$FRAMEWORK" ]] || php codecept build -c $TEST_PATH'
script:
# Run tests if $FRAMEWORK is not empty
- '[[ -z "$FRAMEWORK" ]] || php codecept run $SUITES -c $TEST_PATH'
PK &?V=&w