commit | author | age
|
2207d6
|
1 |
|
W |
2 |
## Codeception\Util\Fixtures |
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
Really basic class to store data in global array and use it in Cests/Tests. |
|
7 |
|
|
8 |
```php |
|
9 |
<?php |
|
10 |
Fixtures::add('user1', ['name' => 'davert']); |
|
11 |
Fixtures::get('user1'); |
|
12 |
Fixtures::exists('user1'); |
|
13 |
|
|
14 |
?> |
|
15 |
``` |
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
#### add() |
|
20 |
|
|
21 |
*public static* add($name, $data) |
|
22 |
|
|
23 |
[See source](https://github.com/Codeception/Codeception/blob/2.5/src/Codeception/Util/Fixtures.php#L21) |
|
24 |
|
|
25 |
#### cleanup() |
|
26 |
|
|
27 |
*public static* cleanup() |
|
28 |
|
|
29 |
[See source](https://github.com/Codeception/Codeception/blob/2.5/src/Codeception/Util/Fixtures.php#L35) |
|
30 |
|
|
31 |
#### exists() |
|
32 |
|
|
33 |
*public static* exists($name) |
|
34 |
|
|
35 |
[See source](https://github.com/Codeception/Codeception/blob/2.5/src/Codeception/Util/Fixtures.php#L40) |
|
36 |
|
|
37 |
#### get() |
|
38 |
|
|
39 |
*public static* get($name) |
|
40 |
|
|
41 |
[See source](https://github.com/Codeception/Codeception/blob/2.5/src/Codeception/Util/Fixtures.php#L26) |
|
42 |
|
|
43 |
<p> </p><div class="alert alert-warning">Reference is taken from the source code. <a href="https://github.com/Codeception/Codeception/blob/2.5/src//Codeception/Util/Fixtures.php">Help us to improve documentation. Edit module reference</a></div> |