Skip to content

Commit da66f55

Browse files
committed
auto updated documentation
1 parent e05bf04 commit da66f55

23 files changed

+313
-63
lines changed

_includes/extensions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ To rerun failed tests just run the `failed` group:
113113
php codecept run -g failed
114114
```
115115

116+
To change failed group name add:
117+
```
118+
--override "extensions: config: Codeception\Extension\RunFailed: fail-group: another_group1"
119+
```
120+
Remember: if you run tests and they generated custom-named fail group, to run this group, you should add override too
121+
116122
Starting from Codeception 2.1 **this extension is enabled by default**.
117123

118124
``` yaml

changelog.markdown

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ title: Codeception Changelog
77

88
# Changelog
99

10+
#### 2.3.6
11+
12+
* **Laravel 5.5 compatibility**. Laravel5 module documentation updated.
13+
* [Doctrine2][DataFactory] Fixes using Doctrine2 with DataFactory module. See [#4529](https://github.com/Codeception/Codeception/issues/4529). Fix by **[samusenkoiv](https://github.com/samusenkoiv)**
14+
* **[REST]** Fixed JsonType crash when key 0 is not an array. Fixes [#4517](https://github.com/Codeception/Codeception/issues/4517) by **[Naktibalda](https://github.com/Naktibalda)**
15+
* [PhpBrowser][Frameworks] `haveHttpHeader` enhanced to handle special characters. [#4541](https://github.com/Codeception/Codeception/issues/4541) by **[bnpatel1990](https://github.com/bnpatel1990)**
16+
* **[WebDriver]** Delete all cookies before loading session snapshot. Fix by **[eXorus](https://github.com/eXorus)**. See [#4487](https://github.com/Codeception/Codeception/issues/4487)
17+
* Added `suite_namespace` config option to suite config. Allows to set custom namespace for tests per suite. [#4525](https://github.com/Codeception/Codeception/issues/4525) by **[pohnean](https://github.com/pohnean)**
18+
* **[Db]** Module enhancements by **[eXorus](https://github.com/eXorus)**:
19+
* added `updateInDatabase` method
20+
* added hidden `_insertInDatabase` to insert record without cleanup
21+
* **[Yii2]** Set transaction also in `backupConfig` when initializing yii2 module
22+
* **[Yii2]** Unload fixtures after rolling back database transaction. By **[devonliu02](https://github.com/devonliu02)** ([#4497](https://github.com/Codeception/Codeception/issues/4497))
23+
* **[Yii2]** Use `andWhere` instead of `where` in Yii module's `findRecord()` by **[SamMousa](https://github.com/SamMousa)**. See [#4482](https://github.com/Codeception/Codeception/issues/4482)
24+
* **[REST]** Added `amNTLMAuthenticated` for NTLM authentication using PhpBrowser. By **[Tenzian](https://github.com/Tenzian)**
25+
* Inject exception file and line number frame into stack trace in case it is missing. By **[rhl-jfm](https://github.com/rhl-jfm)** at [#4491](https://github.com/Codeception/Codeception/issues/4491))
26+
* `Extension\RunFailed`. Added `fail-group` parameter to customize name of a failed group. By @ maxgorovenko
27+
* Added `\Codeception\Util\Fixtures::exists()` method by **[eXorus](https://github.com/eXorus)**
28+
* Added line number to `TestParseException` exception message by **[gaainf](https://github.com/gaainf)**. See [#4446](https://github.com/Codeception/Codeception/issues/4446)
29+
* Fixed `init` command: create the `_generated` folder before writing a `.gitignore` file there by **[nstapelbroek](https://github.com/nstapelbroek)**. See [#4449](https://github.com/Codeception/Codeception/issues/4449)
30+
* Better failure messages for `@dataProvider` by **[sh41](https://github.com/sh41)**. See [#4439](https://github.com/Codeception/Codeception/issues/4439)
31+
* Fixed aliasing issue with `Codeception/Verify` by **[ddinchev](https://github.com/ddinchev)**
32+
1033
#### 2.3.5
1134

1235
* Fixed HTML report with unencoded HTML code by **[mpgo13](https://github.com/mpgo13)**. See [#3819](https://github.com/Codeception/Codeception/issues/3819) [#4423](https://github.com/Codeception/Codeception/issues/4423)
@@ -22,7 +45,7 @@ title: Codeception Changelog
2245
* **[WebDriver]** Make `wait` accept fractional amount of seconds to wait for less than a second. By **[gvlasov](https://github.com/gvlasov)**
2346
* **[Laravel5]** Changing params loader to use `$_SERVER` global instead of `$_ENV`. See [#4401](https://github.com/Codeception/Codeception/issues/4401) by **[EricTendian](https://github.com/EricTendian)**
2447
* **[Mongo]** Fixes `haveInCollection` using `__toString`. See [#4442](https://github.com/Codeception/Codeception/issues/4442) by **[samusenkoiv](https://github.com/samusenkoiv)**
25-
* Dereferencing vairables for Steps output. Fixes [#4402](https://github.com/Codeception/Codeception/issues/4402) by **[alambe](https://github.com/alambe)**
48+
* Dereferencing variables for Steps output. Fixes [#4402](https://github.com/Codeception/Codeception/issues/4402) by **[alambe](https://github.com/alambe)**
2649
* **[Symfony]** Load persistent services before loading profiler. See [#4437](https://github.com/Codeception/Codeception/issues/4437) by **[samusenkoiv](https://github.com/samusenkoiv)**
2750

2851
#### 2.3.4

docs/07-BDD.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Feature: checkout process
7575
{% endhighlight %}
7676

7777
Cucumber, Behat, and sure, **Codeception** can execute this scenario step by step as an automated test.
78-
Every step in this scenario requires a code which defines .
78+
Every step in this scenario requires a code which defines it.
7979

8080
## Gherkin
8181

docs/12-ParallelExecution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,15 @@ Tasks from `\Codeception\Task\SplitTestsByGroups` will generate non-intersecting
265265
<?php
266266
function parallelSplitTests()
267267
{
268-
// Slip your tests by files
268+
// Split your tests by files
269269
$this->taskSplitTestFilesByGroups(5)
270270
->projectRoot('.')
271271
->testsFrom('tests/acceptance')
272272
->groupsTo('tests/_data/paracept_')
273273
->run();
274274

275275
/*
276-
// Slip your tests by single tests (alternatively)
276+
// Split your tests by single tests (alternatively)
277277
$this->taskSplitTestsByGroups(5)
278278
->projectRoot('.')
279279
->testsFrom('tests/acceptance')

docs/modules/AMQP.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ $message = $I->grabMessageFromQueue('queue.emails');
140140
{% endhighlight %}
141141

142142
* `param string` $queue
143-
* `return` AMQPMessage
143+
* `return` \PhpAmqpLib\Message\AMQPMessage
144144

145145

146146
#### purgeAllQueues
@@ -187,7 +187,7 @@ $I->pushToExchange('exchange.emails', new AMQPMessage('Thanks!'), 'severity');
187187
{% endhighlight %}
188188

189189
* `param string` $exchange
190-
* `param string|AMQPMessage` $message
190+
* `param string|\PhpAmqpLib\Message\AMQPMessage` $message
191191
* `param string` $routing_key
192192

193193

@@ -205,7 +205,7 @@ $I->pushToQueue('queue.jobs', new AMQPMessage('create'));
205205
{% endhighlight %}
206206

207207
* `param string` $queue
208-
* `param string|AMQPMessage` $message
208+
* `param string|\PhpAmqpLib\Message\AMQPMessage` $message
209209

210210

211211
#### seeMessageInQueueContainsText

docs/modules/AngularJS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ You can set additional cookie params like `domain`, `path` in array passed as la
887887

888888
#### grabFromCurrentUrl
889889

890-
Executes the given regular expression against the current URI and returns the first match.
890+
Executes the given regular expression against the current URI and returns the first capturing group.
891891
If no parameters are provided, the full URI is returned.
892892

893893
{% highlight php %}

docs/modules/Db.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,19 @@ $I->seeNumRecords(1, 'users', ['name' => 'davert'])
315315

316316

317317
#### updateInDatabase
318-
__not documented__
318+
319+
Update an SQL record into a database.
320+
321+
{% highlight php %}
322+
323+
<?php
324+
$I->updateInDatabase('users', array('isAdmin' => true), array('email' => 'miles@davis.com'));
325+
?>
326+
327+
{% endhighlight %}
328+
329+
* `param string` $table
330+
* `param array` $data
331+
* `param array` $criteria
319332

320333
<p>&nbsp;</p><div class="alert alert-warning">Module reference is taken from the source code. <a href="https://github.com/Codeception/Codeception/tree/2.3/src/Codeception/Module/Db.php">Help us to improve documentation. Edit module reference</a></div>

docs/modules/Laravel5.md

Lines changed: 55 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,12 @@ title: Laravel5 - Codeception - Documentation
1111

1212

1313

14-
This module allows you to run functional tests for Laravel 5.
14+
This module allows you to run functional tests for Laravel 5.1+
1515
It should **not** be used for acceptance tests.
1616
See the Acceptance tests section below for more details.
1717

18-
As of Codeception 2.2 this module only works for Laravel 5.1 and later releases.
19-
If you want to test a Laravel 5.0 application you have to use Codeception 2.1.
20-
You can also upgrade your Laravel application to 5.1, for more details check the Laravel Upgrade Guide
21-
at <https://laravel.com/docs/master/upgrade>.
22-
2318
### Demo project
24-
<https://github.com/janhenkgerritsen/codeception-laravel5-sample>
25-
26-
### Status
27-
28-
* Maintainer: **Jan-Henk Gerritsen**
29-
* Stability: **stable**
30-
31-
### Example
32-
33-
modules:
34-
enabled:
35-
- Laravel5:
36-
environment_file: .env.testing
19+
<https://github.com/codeception/codeception-laravel5-sample>
3720

3821
### Config
3922

@@ -54,6 +37,31 @@ at <https://laravel.com/docs/master/upgrade>.
5437
* disable_model_events: `boolean`, default `false` - disable model events.
5538
* url: `string`, default `` - the application URL.
5639

40+
#### Example #1 (`functional.suite.yml`)
41+
42+
Enabling module:
43+
44+
{% highlight yaml %}
45+
yml
46+
modules:
47+
enabled:
48+
- Laravel5
49+
50+
{% endhighlight %}
51+
52+
#### Example #2 (`functional.suite.yml`)
53+
54+
Enabling module with custom .env file
55+
56+
{% highlight yaml %}
57+
yml
58+
modules:
59+
enabled:
60+
- Laravel5:
61+
environment_file: .env.testing
62+
63+
{% endhighlight %}
64+
5765
### API
5866

5967
* app - `Illuminate\Foundation\Application`
@@ -72,17 +80,23 @@ at <https://laravel.com/docs/master/upgrade>.
7280
### Acceptance tests
7381

7482
You should not use this module for acceptance tests.
75-
If you want to use Laravel functionality with your acceptance tests,
76-
for example to do test setup, you can initialize the Laravel functionality
77-
by adding the following lines of code to the `_bootstrap.php` file of your test suite:
83+
If you want to use Eloquent within your acceptance tests (paired with WebDriver) enable only
84+
ORM part of this module:
7885

79-
require 'bootstrap/autoload.php';
80-
$app = require 'bootstrap/app.php';
81-
$app->loadEnvironmentFrom('.env.testing');
82-
$app->instance('request', new \Illuminate\Http\Request);
83-
$app->make('Illuminate\Contracts\Http\Kernel')->bootstrap();
86+
#### Example (`acceptance.suite.yml`)
8487

88+
{% highlight yaml %}
8589

90+
modules:
91+
enabled:
92+
- WebDriver:
93+
browser: chrome
94+
url: http://127.0.0.1:8000
95+
- Laravel5:
96+
part: ORM
97+
environment_file: .env.testing
98+
99+
{% endhighlight %}
86100

87101

88102
### Actions
@@ -866,7 +880,7 @@ You can set additional cookie params like `domain`, `path` in array passed as la
866880

867881
#### grabFromCurrentUrl
868882

869-
Executes the given regular expression against the current URI and returns the first match.
883+
Executes the given regular expression against the current URI and returns the first capturing group.
870884
If no parameters are provided, the full URI is returned.
871885

872886
{% highlight php %}
@@ -1107,6 +1121,19 @@ $I->haveHttpHeader('X-Requested-With', 'Codeception');
11071121
$I->amOnPage('test-headers.php');
11081122
?>
11091123

1124+
{% endhighlight %}
1125+
1126+
To use special chars in Header Key use HTML Character Entities:
1127+
Example:
1128+
Header with underscore - 'Client_Id'
1129+
should be represented as - 'Client&#x0005F;Id' or 'Client&#95;Id'
1130+
1131+
{% highlight php %}
1132+
1133+
<?php
1134+
$I->haveHttpHeader('Client&#95;Id', 'Codeception');
1135+
?>
1136+
11101137
{% endhighlight %}
11111138

11121139
* `param string` $name the name of the request header

docs/modules/Lumen.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ You can set additional cookie params like `domain`, `path` in array passed as la
681681

682682
#### grabFromCurrentUrl
683683

684-
Executes the given regular expression against the current URI and returns the first match.
684+
Executes the given regular expression against the current URI and returns the first capturing group.
685685
If no parameters are provided, the full URI is returned.
686686

687687
{% highlight php %}
@@ -902,6 +902,19 @@ $I->haveHttpHeader('X-Requested-With', 'Codeception');
902902
$I->amOnPage('test-headers.php');
903903
?>
904904

905+
{% endhighlight %}
906+
907+
To use special chars in Header Key use HTML Character Entities:
908+
Example:
909+
Header with underscore - 'Client_Id'
910+
should be represented as - 'Client&#x0005F;Id' or 'Client&#95;Id'
911+
912+
{% highlight php %}
913+
914+
<?php
915+
$I->haveHttpHeader('Client&#95;Id', 'Codeception');
916+
?>
917+
905918
{% endhighlight %}
906919

907920
* `param string` $name the name of the request header

docs/modules/Phalcon.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ You can set additional cookie params like `domain`, `path` in array passed as la
706706

707707
#### grabFromCurrentUrl
708708

709-
Executes the given regular expression against the current URI and returns the first match.
709+
Executes the given regular expression against the current URI and returns the first capturing group.
710710
If no parameters are provided, the full URI is returned.
711711

712712
{% highlight php %}
@@ -839,6 +839,19 @@ $I->haveHttpHeader('X-Requested-With', 'Codeception');
839839
$I->amOnPage('test-headers.php');
840840
?>
841841

842+
{% endhighlight %}
843+
844+
To use special chars in Header Key use HTML Character Entities:
845+
Example:
846+
Header with underscore - 'Client_Id'
847+
should be represented as - 'Client&#x0005F;Id' or 'Client&#95;Id'
848+
849+
{% highlight php %}
850+
851+
<?php
852+
$I->haveHttpHeader('Client&#95;Id', 'Codeception');
853+
?>
854+
842855
{% endhighlight %}
843856

844857
* `param string` $name the name of the request header

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy