Skip to content

Commit 9716f0c

Browse files
committed
auto updated documentation
1 parent 68adea7 commit 9716f0c

File tree

7 files changed

+75
-9
lines changed

7 files changed

+75
-9
lines changed

changelog.markdown

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ title: Codeception Changelog
77

88
# Changelog
99

10+
#### 2.3.9
11+
12+
* Added `Codeception\Step\Argument\PasswordArgument` to pass sensitive data into tests:
13+
14+
```php
15+
<?php
16+
use \Codeception\Step\Argument\PasswordArgument;
17+
18+
$I->amOnPage('/form/password_argument');
19+
$I->fillField('password', new PasswordArgument('thisissecret'));
20+
```
21+
22+
* **[WebDriver]** added `clearField` method to clean up input fields by **[eknej](https://github.com/eknej)**
23+
* **[DataFactory]** added `make` method to create instances without saving them to database. But **[ibpavlov](https://github.com/ibpavlov)**
24+
* **[REST]** Fixed passing a file to `sendPOST()` without name, size or type parameter. BY **[zebraf1](https://github.com/zebraf1)**
25+
* **[REST]** Add missing / to relative url from config by **[bscheshirwork](https://github.com/bscheshirwork)**
26+
* Fixed HTML Report marks tests as succeeded by **[mpgo13](https://github.com/mpgo13)**
27+
* `clean` command works recursively with included setups. By **[davidnewcomb](https://github.com/davidnewcomb)**
28+
29+
1030
#### 2.3.8
1131

1232
* `Codeception\Util\Stub` moved to standalone package [Codeception\Stub](https://github.com/Codeception/Stub):

docs/05-UnitTests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class UserTest extends \Codeception\Test\Unit
104104

105105
### Assertions
106106

107-
There are pretty much assertions you can use inside tests. The most common are:
107+
There are pretty many assertions you can use inside tests. The most common are:
108108

109109
* `$this->assertEquals()`
110110
* `$this->assertContains()`

docs/12-ParallelExecution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ We prepared a sample config with codeception, web server, database, and selenium
4747

4848
version: '2'
4949
services:
50-
codeception:
50+
codecept:
5151
image: codeception/codeception
5252
depends_on:
5353
- firefox

docs/modules/AngularJS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,19 @@ $I->checkOption('#agree');
399399
* `param` $option
400400

401401

402+
#### clearField
403+
404+
lears given field which isn't empty.
405+
406+
`` php
407+
?php
408+
I->clearField('#username');
409+
>
410+
``
411+
412+
param $field
413+
414+
402415
#### click
403416

404417
Perform a click on a link or a button, given by a locator.

docs/modules/DataFactory.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $fm->define(User::class)->setDefinitions([
4141

4242
// generate a profile and return its Id
4343
'profile_id' => 'factory|Profile'
44-
);
44+
]);
4545

4646
{% endhighlight %}
4747

@@ -63,7 +63,7 @@ modules:
6363
(you can also use Laravel5 and Phalcon).
6464

6565
In this example factories are loaded from `tests/_support/factories` directory. Please note that this directory is relative from the codeception.yml file (so for Yii2 it would be codeception/_support/factories).
66-
* You should create this directory manually and create PHP files in it with factories definitions following [official documentation](https://github.com/thephpleague/factory-muffin#usage).
66+
You should create this directory manually and create PHP files in it with factories definitions following [official documentation](https://github.com/thephpleague/factory-muffin#usage).
6767

6868
In cases you want to use data from database inside your factory definitions you can define them in Helper.
6969
For instance, if you use Doctrine, this allows you to access `EntityManager` inside a definition.
@@ -147,7 +147,7 @@ $I->have('User', ['is_active' => true]); // creates active user
147147

148148
Returns an instance of created user.
149149

150-
* `param` $name
150+
* `param string` $name
151151
* `param array` $extraAttrs
152152

153153
* `return` object
@@ -164,10 +164,31 @@ $I->haveMultiple('User', 10, ['is_active' => true]); // create 10 active users
164164

165165
{% endhighlight %}
166166

167-
* `param` $name
168-
* `param` $times
167+
* `param string` $name
168+
* `param int` $times
169169
* `param array` $extraAttrs
170170

171171
* `return` \object[]
172172

173+
174+
#### make
175+
176+
Generates a record instance.
177+
178+
This does not save it in the database. Use `have` for that.
179+
180+
{% highlight php %}
181+
182+
$user = $I->make('User'); // return User instance
183+
$activeUser = $I->make('User', ['is_active' => true]); // return active user instance
184+
185+
{% endhighlight %}
186+
187+
Returns an instance of created user without creating a record in database.
188+
189+
* `param string` $name
190+
* `param array` $extraAttrs
191+
192+
* `return` object
193+
173194
<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/DataFactory.php">Help us to improve documentation. Edit module reference</a></div>

docs/modules/WebDriver.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,19 @@ $I->checkOption('#agree');
599599
* `param` $option
600600

601601

602+
#### clearField
603+
604+
lears given field which isn't empty.
605+
606+
`` php
607+
?php
608+
I->clearField('#username');
609+
>
610+
``
611+
612+
param $field
613+
614+
602615
#### click
603616

604617
Perform a click on a link or a button, given by a locator.

docs/reference/Commands.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,9 @@ Generates StepObject class. You will be asked for steps you want to implement.
283283

284284
## Clean
285285

286-
Cleans `output` directory
286+
Recursively cleans `output` directory and generated code.
287287

288288
* `codecept clean`
289-
* `codecept clean -c path/to/project`
290289

291290

292291

0 commit comments

Comments
 (0)