Skip to content

Commit 825bedb

Browse files
committed
auto updated documentation
1 parent 0dacc38 commit 825bedb

15 files changed

+135
-51
lines changed

changelog.markdown

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ title: Codeception Changelog
77

88
# Changelog
99

10+
#### 3.0.3
11+
- **[Laravel5]** Add `make` and `makeMultiple` methods for generating model instance by **[ibpavlov](https://github.com/ibpavlov)**
12+
- **[Lumen]** Add `make` and `makeMultiple` methods for generating model instance by **[ibpavlov](https://github.com/ibpavlov)**
13+
- **[Phalcon]** ActiveRecord: escape all column names using [] by **[maxgalbu](https://github.com/maxgalbu)**
14+
- **[Yii2]** Fixed issue on PHP7.3 because `preg_quote` now also quotes `#` by **[SamMousa](https://github.com/SamMousa)**
15+
- **[ZF2]** Persistent service functionality for ZF3 by **[svycka](https://github.com/svycka)**
16+
- **[ZF2]** Doctrine entity manager name is configurable by **[svycka](https://github.com/svycka)**
17+
- **[Db]** Fix sqlite connection close when holding reference in PHP's GC ([#5557](https://github.com/Codeception/Codeception/issues/5557)) by **[hoogi91](https://github.com/hoogi91)**
18+
- **[Doctrine2]** Fixed handling of embedables, inherited entities and parameter name clashes by **[alexkunin](https://github.com/alexkunin)**
19+
- [Frameworks][PhpBrowser] Fixed compatibility with symfony/browserkit 4.3 by **[kapcus](https://github.com/kapcus)**
20+
- **[Docs]** Small documentation updates by **[Nebulosar](https://github.com/Nebulosar)**, **[reinholdfuereder](https://github.com/reinholdfuereder)** and **[richardbrinkman](https://github.com/richardbrinkman)**
21+
- **[Docker]** Switched to buster php build by **[OneEyedSpaceFish](https://github.com/OneEyedSpaceFish)**
22+
1023
#### 3.0.2
1124
* **[weshooper](https://github.com/weshooper)** reduced size of exported package.
1225
* --no-redirect option disables the redirect to a Composer-installed version, by **[DanielRuf](https://github.com/DanielRuf)**
@@ -43,11 +56,11 @@ title: Codeception Changelog
4356
> Upgrade Notice: If you face issues with conflicting PHPUnit classes or difference in method signatures, lock version for PHPUnit in composer.json: “phpunit/phpunit”:”^7.0.0”
4457
* **BREAKING** Multi-session testing disabled by default. Add `use \Codeception\Lib\Actor\Shared\Friend;` to enable `$I->haveFriend`.
4558
* **BREAKING** **[WebDriver]** `pauseExecution` removed in favor of `$I->pause()`
46-
* [Interactive pause](https://codeception.com/docs/02-GettingStarted#Interactive-Pause) inside tests with `$I->pause();` command in debug mode added. Allows to write and debug test in realtime.
47-
* Introduced [Step Decorators](https://codeception.com/docs/08-Customization#Step-Decorators) - auto-generated actions around module and helper methods. As part of this feature implemented
59+
* [Interactive pause](https://codeception.com/docs/02-GettingStarted#Interactive-Pause) inside tests with `$I->pause()` command in debug mode added. Allows to write and debug test in realtime.
60+
* Introduced [Step Decorators](https://codeception.com/docs/08-Customization#Step-Decorators) - auto-generated actions around module and helper methods. As part of this feature implemented:
4861
* [Conditional Assertions](https://codeception.com/docs/03-AcceptanceTests#Conditional-Assertions) (`$I->canSee()`)
49-
* [Retries](https://codeception.com/docs/03-AcceptanceTests#Retry) (`$I->retryClick()`);
50-
* [Silent Actions](https://codeception.com/docs/03-AcceptanceTests#A-B-Testing)(`$I->tryToClick`).
62+
* [Retries](https://codeception.com/docs/03-AcceptanceTests#Retry) (`$I->retryClick()`)
63+
* [Silent Actions](https://codeception.com/docs/03-AcceptanceTests#AB-Testing) (`$I->tryToClick()`)
5164
* Print artifacts on test failure
5265
* **[REST]** Short API responses in debug mode with `shortDebugResponse` config option. See [#5455](https://github.com/Codeception/Codeception/issues/5455) by **[sebastianneubert](https://github.com/sebastianneubert)**
5366
* **[WebDriver]** `switchToIFrame` allow to locate iframe by CSS/XPath.

docs/03-AcceptanceTests.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,19 +584,20 @@ $I->retrySee('Something changed');
584584

585585
{% endhighlight %}
586586

587-
Retry can be configured via `$I->retry()` command, where you can set number of retries and interval.
587+
Retry can be configured via `$I->retry()` command, where you can set number of retries and initial interval:
588+
interval will be doubled on each unsuccessful execution.
588589

589590
{% highlight php %}
590591

591592
<?php
592-
// Retry up to 4 sec: 10 times, for 400ms interval
593-
$I->retry(10, 400);
593+
// Retry up to 6 sec: 4 times, for 400ms initial interval => 400ms + 800ms + 1600ms + 3200ms = 6000ms
594+
$I->retry(4, 400);
594595

595596
{% endhighlight %}
596597

597598
`$I->retry` takes 2 parameters:
598599
* number of retries (1 by default)
599-
* interval (200ms by default)
600+
* initial interval (200ms by default)
600601

601602
Retries are disabled by default. To enable them you should add retry step decorators to suite config:
602603

docs/04-FunctionalTests.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,6 @@ modules:
116116
Yii2 tests are included in [Basic](https://github.com/yiisoft/yii2-app-basic)
117117
and [Advanced](https://github.com/yiisoft/yii2-app-advanced) application templates. Follow the Yii2 guides to start.
118118

119-
### Yii
120-
121-
By itself Yii framework does not have an engine for functional testing.
122-
So Codeception is the first and the only functional testing framework for Yii.
123-
To use it with Yii include `Yii1` module into config:
124-
125-
{% highlight yaml %}
126-
127-
# functional.suite.yml
128-
129-
actor: FunctionalTester
130-
modules:
131-
enabled:
132-
- Yii1
133-
- \Helper\Functional
134-
135-
{% endhighlight %}
136-
137-
To avoid the common pitfalls we discussed earlier, Codeception provides basic hooks over the Yii engine.
138-
Please set them up following [the installation steps in the module reference](http://codeception.com/docs/modules/Yii1).
139-
140119
### Zend Framework 2
141120

142121
Use [the ZF2 module](http://codeception.com/docs/modules/ZF2) to run functional tests inside Zend Framework 2:
@@ -269,7 +248,7 @@ The error reporting level can be set in the suite configuration file:
269248
actor: FunctionalTester
270249
modules:
271250
enabled:
272-
- Yii1
251+
- Yii2
273252
- \Helper\Functional
274253
error_level: "E_ALL & ~E_STRICT & ~E_DEPRECATED"
275254

docs/08-Customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class MyCustomExtension extends \Codeception\Extension
148148
149149
public static $events = array(
150150
Events::SUITE_AFTER => 'afterSuite',
151-
Events::SUITE_BEFORE => 'beforeTest',
151+
Events::TEST_BEFORE => 'beforeTest',
152152
Events::STEP_BEFORE => 'beforeStep',
153153
Events::TEST_FAIL => 'testFailed',
154154
Events::RESULT_PRINT_AFTER => 'print',

docs/12-ContinuousIntegration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ php vendor/bin/codecept run
125125

126126
{% endhighlight %}
127127

128-
More details on configuration can be learned from Codeception's [`.travis.yml`](https://github.com/Codeception/Codeception/blob/master/.travis.yml).
128+
More details on configuration can be learned from Codeception's [`.travis.yml`](https://github.com/Codeception/Codeception/blob/3.0/.travis.yml).
129129

130130
Travis doesn't provide visualization for XML or HTML reports so you can't view reports in format any different than console output. However, Codeception produces nice console output with detailed error reports.
131131

docs/12-ParallelExecution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ To prepare application and tests to be executed inside containers you will need
4141

4242
Define all required services in `docker-compose.yml` file. Make sure to follow Docker philisophy: 1 service = 1 container. So each process should be defined as its own service. Those services can use official Docker images pulled from DockerHub. Directories with code and tests should be mounted using `volume` directive. And exposed ports should be explicitly set using `ports` directive.
4343

44-
We prepared a sample config with codeception, web server, database, and selenium with firefox to be executed together.
44+
We prepared a sample config with codeception, web server, database, and selenium with Chrome to be executed together.
4545

4646
{% highlight yaml %}
4747

docs/modules/Laravel5.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,28 @@ $I->haveSingleton('My\Interface', 'My\Singleton');
12251225
Logout user.
12261226

12271227

1228+
#### make
1229+
1230+
Use Laravel's model factory to make a model instance.
1231+
Can only be used with Laravel 5.1 and later.
1232+
1233+
{% highlight php %}
1234+
1235+
<?php
1236+
$I->make('App\User');
1237+
$I->make('App\User', ['name' => 'John Doe']);
1238+
$I->make('App\User', [], 'admin');
1239+
?>
1240+
1241+
{% endhighlight %}
1242+
1243+
@see http://laravel.com/docs/5.1/testing#model-factories
1244+
* `param string` $model
1245+
* `param array` $attributes
1246+
* `param string` $name
1247+
* `[Part]` orm
1248+
1249+
12281250
#### makeHtmlSnapshot
12291251

12301252
Saves current page's HTML into a temprary file.
@@ -1233,16 +1255,39 @@ Use this method in debug mode within an interactive pause to get a source code o
12331255
{% highlight php %}
12341256

12351257
<?php
1236-
$I->makePageSnapshot('edit_page');
1258+
$I->makeHtmlSnapshot('edit_page');
12371259
// saved to: tests/_output/debug/edit_page.html
1238-
$I->makePageSnapshot();
1260+
$I->makeHtmlSnapshot();
12391261
// saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html
12401262

12411263
{% endhighlight %}
12421264

12431265
* `param null` $name
12441266

12451267

1268+
#### makeMultiple
1269+
1270+
Use Laravel's model factory to make multiple model instances.
1271+
Can only be used with Laravel 5.1 and later.
1272+
1273+
{% highlight php %}
1274+
1275+
<?php
1276+
$I->makeMultiple('App\User', 10);
1277+
$I->makeMultiple('App\User', 10, ['name' => 'John Doe']);
1278+
$I->makeMultiple('App\User', 10, [], 'admin');
1279+
?>
1280+
1281+
{% endhighlight %}
1282+
1283+
@see http://laravel.com/docs/5.1/testing#model-factories
1284+
* `param string` $model
1285+
* `param int` $times
1286+
* `param array` $attributes
1287+
* `param string` $name
1288+
* `[Part]` orm
1289+
1290+
12461291
#### moveBack
12471292

12481293
Moves back in history.

docs/modules/Lumen.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,28 @@ $I->haveSingleton('My\Interface', 'My\Singleton');
998998
* `param` $concrete
999999

10001000

1001+
#### make
1002+
1003+
Use Lumen's model factory to make a model instance.
1004+
Can only be used with Lumen 5.1 and later.
1005+
1006+
{% highlight php %}
1007+
1008+
<?php
1009+
$I->make('App\User');
1010+
$I->make('App\User', ['name' => 'John Doe']);
1011+
$I->make('App\User', [], 'admin');
1012+
?>
1013+
1014+
{% endhighlight %}
1015+
1016+
@see https://lumen.laravel.com/docs/master/testing#model-factories
1017+
* `param string` $model
1018+
* `param array` $attributes
1019+
* `param string` $name
1020+
* `[Part]` orm
1021+
1022+
10011023
#### makeHtmlSnapshot
10021024

10031025
Saves current page's HTML into a temprary file.
@@ -1006,16 +1028,39 @@ Use this method in debug mode within an interactive pause to get a source code o
10061028
{% highlight php %}
10071029

10081030
<?php
1009-
$I->makePageSnapshot('edit_page');
1031+
$I->makeHtmlSnapshot('edit_page');
10101032
// saved to: tests/_output/debug/edit_page.html
1011-
$I->makePageSnapshot();
1033+
$I->makeHtmlSnapshot();
10121034
// saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html
10131035

10141036
{% endhighlight %}
10151037

10161038
* `param null` $name
10171039

10181040

1041+
#### makeMultiple
1042+
1043+
Use Laravel's model factory to make multiple model instances.
1044+
Can only be used with Lumen 5.1 and later.
1045+
1046+
{% highlight php %}
1047+
1048+
<?php
1049+
$I->makeMultiple('App\User', 10);
1050+
$I->makeMultiple('App\User', 10, ['name' => 'John Doe']);
1051+
$I->makeMultiple('App\User', 10, [], 'admin');
1052+
?>
1053+
1054+
{% endhighlight %}
1055+
1056+
@see https://lumen.laravel.com/docs/master/testing#model-factories
1057+
* `param string` $model
1058+
* `param int` $times
1059+
* `param array` $attributes
1060+
* `param string` $name
1061+
* `[Part]` orm
1062+
1063+
10191064
#### moveBack
10201065

10211066
Moves back in history.

docs/modules/Phalcon.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,9 @@ Use this method in debug mode within an interactive pause to get a source code o
880880
{% highlight php %}
881881

882882
<?php
883-
$I->makePageSnapshot('edit_page');
883+
$I->makeHtmlSnapshot('edit_page');
884884
// saved to: tests/_output/debug/edit_page.html
885-
$I->makePageSnapshot();
885+
$I->makeHtmlSnapshot();
886886
// saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html
887887

888888
{% endhighlight %}

docs/modules/PhpBrowser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,9 +817,9 @@ Use this method in debug mode within an interactive pause to get a source code o
817817
{% highlight php %}
818818

819819
<?php
820-
$I->makePageSnapshot('edit_page');
820+
$I->makeHtmlSnapshot('edit_page');
821821
// saved to: tests/_output/debug/edit_page.html
822-
$I->makePageSnapshot();
822+
$I->makeHtmlSnapshot();
823823
// saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html
824824

825825
{% endhighlight %}

0 commit comments

Comments
 (0)