Skip to content

Commit 64e008e

Browse files
committed
Use new directory structure in documentation
Codeception#661 done right
1 parent be813e8 commit 64e008e

File tree

10 files changed

+42
-42
lines changed

10 files changed

+42
-42
lines changed

docs/BDD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ Text values inside a scenarios can be set inside a `"""` block:
443443
paths:
444444
tests: tests
445445
log: tests/_output
446-
data: tests/_data
447-
helpers: tests/_support
446+
data: tests/Support/Data
447+
helpers: tests/Support
448448
envs: tests/_envs
449449
"""
450450
```

docs/Customization.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Extensions have some basic methods you can use:
189189
### Enabling Extension
190190

191191
Once you've implemented a simple extension class, you can require it in `tests/_bootstrap.php`,
192-
load it with Composer's autoloader defined in `composer.json`, or store the class inside `tests/_support`dir.
192+
load it with Composer's autoloader defined in `composer.json`, or store the class inside `tests/Support`dir.
193193

194194
You can then enable it in `codeception.yml`
195195

@@ -253,7 +253,7 @@ extensions:
253253
If you want to activate the Command globally, because you are using more then one `codeception.yml` file,
254254
you have to register your command in the `codeception.dist.yml` in the root folder of your project.
255255

256-
Please see the [complete example](https://github.com/Codeception/Codeception/blob/4.0/tests/data/register_command/examples/MyCustomCommand.php)
256+
Please see the [complete example](https://github.com/Codeception/Codeception/blob/5.0/tests/data/register_command/examples/MyCustomCommand.php)
257257

258258
## Group Objects
259259

@@ -320,7 +320,7 @@ For instance, for `nocleanup` group we prevent Doctrine2 module from wrapping te
320320
```
321321

322322
A group class can be created with `php vendor/bin/codecept generate:group groupname` command.
323-
Group classes will be stored in the `tests/_support/Group` directory.
323+
Group classes will be stored in the `tests/Support/Group` directory.
324324

325325
A group class can be enabled just like you enable an extension class. In the file `codeception.yml`:
326326

@@ -413,7 +413,7 @@ A group file can be included by its relative filename:
413413
```yaml
414414
groups:
415415
# requiring a group file
416-
slow: tests/_data/slow.txt
416+
slow: tests/Support/Data/slow.txt
417417
418418
```
419419

@@ -424,11 +424,11 @@ You can even specify patterns for loading multiple group files with a single def
424424

425425
```yaml
426426
groups:
427-
p*: tests/_data/p*
427+
p*: tests/Support/Data/p*
428428
429429
```
430430

431-
This will load all found `p*` files in `tests/_data` as groups. Group names will be as follows p1,p2,...,pN.
431+
This will load all found `p*` files in `tests/Support/Data` as groups. Group names will be as follows p1,p2,...,pN.
432432

433433
## Formats
434434

docs/Data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ modules:
4848
dsn: 'PDO DSN HERE'
4949
user: 'root'
5050
password:
51-
dump: tests/_data/your-dump-name.sql
51+
dump: tests/Support/Data/your-dump-name.sql
5252
cleanup: true # reload dump between tests
5353
populate: true # load dump before all tests
5454

@@ -66,7 +66,7 @@ modules:
6666
password: ''
6767
cleanup: true # run populator before each test
6868
populate: true # run populator before all test
69-
populator: 'mysql -u $user $dbname < tests/_data/dump.sql'
69+
populator: 'mysql -u $user $dbname < tests/Support/Data/dump.sql'
7070
```
7171
7272
See the [Db module reference](https://codeception.com/docs/modules/Db#SQL-data-dump) for more examples.
@@ -319,7 +319,7 @@ public function testCategoriesAreTheSame(AcceptanceTester $I, \Tests\Snapshot\Ca
319319
}
320320
```
321321

322-
On the first run, data will be obtained via `fetchData` method and saved to `tests/_data` directory in json format.
322+
On the first run, data will be obtained via `fetchData` method and saved to `tests/Support/Data` directory in json format.
323323
On next execution the obtained data will be compared with previously saved snapshot.
324324

325325
> To update a snapshot with new data, run tests in `--debug` mode.

docs/ParallelExecution.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ public function parallelSplitTests()
160160
$this->taskSplitTestFilesByGroups(5)
161161
->projectRoot('.')
162162
->testsFrom('tests/acceptance')
163-
->groupsTo('tests/_data/paracept_')
163+
->groupsTo('tests/Support/Data/paracept_')
164164
->run();
165165

166166
/*
167167
// Split your tests by single tests (alternatively)
168168
$this->taskSplitTestsByGroups(5)
169169
->projectRoot('.')
170170
->testsFrom('tests/acceptance')
171-
->groupsTo('tests/_data/paracept_')
171+
->groupsTo('tests/Support/Data/paracept_')
172172
->run();
173173
*/
174174
}
@@ -188,19 +188,19 @@ The output should be similar to this:
188188

189189
```
190190
[Codeception\Task\SplitTestFilesByGroupsTask] Processing 33 files
191-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_1
192-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_2
193-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_3
194-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_4
195-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_5
191+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_1
192+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_2
193+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_3
194+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_4
195+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_5
196196
197197
```
198198

199199
Now we have group files. We should update `codeception.yml` to load generated group files. In our case we have groups: *paracept_1*, *paracept_2*, *paracept_3*, *paracept_4*, *paracept_5*.
200200

201201
```yaml
202202
groups:
203-
paracept_*: tests/_data/paracept_*
203+
paracept_*: tests/Support/Data/paracept_*
204204
```
205205
206206
Let's try to execute tests from the second group:

docs/ReusingTestCode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ php vendor/bin/codecept generate:pageobject acceptance Login
100100

101101
> It is recommended to use page objects for acceptance testing only
102102

103-
This will create a `Login` class in `tests/_support/Page/Acceptance`.
103+
This will create a `Login` class in `tests/Support/Page/Acceptance`.
104104
The basic PageObject is nothing more than an empty class with a few stubs.
105105

106106
It is expected that you will populate it with the UI locators of a page it represents. Locators can be added as public properties:
@@ -210,7 +210,7 @@ Add action to StepObject class (ENTER to exit):
210210
StepObject was created in /tests/acceptance/_support/Step/Acceptance/Admin.php
211211
```
212212
213-
This will generate a class in `/tests/_support/Step/Acceptance/Admin.php` similar to this:
213+
This will generate a class in `/tests/Support/Step/Acceptance/Admin.php` similar to this:
214214
215215
```php
216216
<?php

guides/06-ReusingTestCode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ php vendor/bin/codecept generate:pageobject acceptance Login
9393

9494
> It is recommended to use page objects for acceptance testing only
9595

96-
This will create a `Login` class in `tests/_support/Page/Acceptance`.
96+
This will create a `Login` class in `tests/Support/Page/Acceptance`.
9797
The basic PageObject is nothing more than an empty class with a few stubs.
9898

9999
It is expected that you will populate it with the UI locators of a page it represents. Locators can be added as public properties:
@@ -203,7 +203,7 @@ Add action to StepObject class (ENTER to exit):
203203
StepObject was created in /tests/acceptance/_support/Step/Acceptance/Admin.php
204204
```
205205
206-
This will generate a class in `/tests/_support/Step/Acceptance/Admin.php` similar to this:
206+
This will generate a class in `/tests/Support/Step/Acceptance/Admin.php` similar to this:
207207
208208
```php
209209
<?php

guides/07-BDD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ Text values inside a scenarios can be set inside a `"""` block:
436436
paths:
437437
tests: tests
438438
log: tests/_output
439-
data: tests/_data
440-
helpers: tests/_support
439+
data: tests/Support/Data
440+
helpers: tests/Support
441441
envs: tests/_envs
442442
"""
443443
```

guides/08-Customization.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Extensions have some basic methods you can use:
182182
### Enabling Extension
183183

184184
Once you've implemented a simple extension class, you can require it in `tests/_bootstrap.php`,
185-
load it with Composer's autoloader defined in `composer.json`, or store the class inside `tests/_support`dir.
185+
load it with Composer's autoloader defined in `composer.json`, or store the class inside `tests/Support`dir.
186186

187187
You can then enable it in `codeception.yml`
188188

@@ -246,7 +246,7 @@ extensions:
246246
If you want to activate the Command globally, because you are using more then one `codeception.yml` file,
247247
you have to register your command in the `codeception.dist.yml` in the root folder of your project.
248248

249-
Please see the [complete example](https://github.com/Codeception/Codeception/blob/4.0/tests/data/register_command/examples/MyCustomCommand.php)
249+
Please see the [complete example](https://github.com/Codeception/Codeception/blob/5.0/tests/data/register_command/examples/MyCustomCommand.php)
250250

251251
## Group Objects
252252

@@ -313,7 +313,7 @@ For instance, for `nocleanup` group we prevent Doctrine2 module from wrapping te
313313
```
314314

315315
A group class can be created with `php vendor/bin/codecept generate:group groupname` command.
316-
Group classes will be stored in the `tests/_support/Group` directory.
316+
Group classes will be stored in the `tests/Support/Group` directory.
317317

318318
A group class can be enabled just like you enable an extension class. In the file `codeception.yml`:
319319

@@ -406,7 +406,7 @@ A group file can be included by its relative filename:
406406
```yaml
407407
groups:
408408
# requiring a group file
409-
slow: tests/_data/slow.txt
409+
slow: tests/Support/Data/slow.txt
410410
411411
```
412412

@@ -417,11 +417,11 @@ You can even specify patterns for loading multiple group files with a single def
417417

418418
```yaml
419419
groups:
420-
p*: tests/_data/p*
420+
p*: tests/Support/Data/p*
421421
422422
```
423423

424-
This will load all found `p*` files in `tests/_data` as groups. Group names will be as follows p1,p2,...,pN.
424+
This will load all found `p*` files in `tests/Support/Data` as groups. Group names will be as follows p1,p2,...,pN.
425425

426426
## Formats
427427

guides/09-Data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ modules:
4141
dsn: 'PDO DSN HERE'
4242
user: 'root'
4343
password:
44-
dump: tests/_data/your-dump-name.sql
44+
dump: tests/Support/Data/your-dump-name.sql
4545
cleanup: true # reload dump between tests
4646
populate: true # load dump before all tests
4747

@@ -59,7 +59,7 @@ modules:
5959
password: ''
6060
cleanup: true # run populator before each test
6161
populate: true # run populator before all test
62-
populator: 'mysql -u $user $dbname < tests/_data/dump.sql'
62+
populator: 'mysql -u $user $dbname < tests/Support/Data/dump.sql'
6363
```
6464
6565
See the [Db module reference](https://codeception.com/docs/modules/Db#SQL-data-dump) for more examples.
@@ -312,7 +312,7 @@ public function testCategoriesAreTheSame(AcceptanceTester $I, \Tests\Snapshot\Ca
312312
}
313313
```
314314

315-
On the first run, data will be obtained via `fetchData` method and saved to `tests/_data` directory in json format.
315+
On the first run, data will be obtained via `fetchData` method and saved to `tests/Support/Data` directory in json format.
316316
On next execution the obtained data will be compared with previously saved snapshot.
317317

318318
> To update a snapshot with new data, run tests in `--debug` mode.

guides/12-ParallelExecution.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ public function parallelSplitTests()
153153
$this->taskSplitTestFilesByGroups(5)
154154
->projectRoot('.')
155155
->testsFrom('tests/acceptance')
156-
->groupsTo('tests/_data/paracept_')
156+
->groupsTo('tests/Support/Data/paracept_')
157157
->run();
158158

159159
/*
160160
// Split your tests by single tests (alternatively)
161161
$this->taskSplitTestsByGroups(5)
162162
->projectRoot('.')
163163
->testsFrom('tests/acceptance')
164-
->groupsTo('tests/_data/paracept_')
164+
->groupsTo('tests/Support/Data/paracept_')
165165
->run();
166166
*/
167167
}
@@ -181,19 +181,19 @@ The output should be similar to this:
181181

182182
```
183183
[Codeception\Task\SplitTestFilesByGroupsTask] Processing 33 files
184-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_1
185-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_2
186-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_3
187-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_4
188-
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/_data/paracept_5
184+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_1
185+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_2
186+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_3
187+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_4
188+
[Codeception\Task\SplitTestFilesByGroupsTask] Writing tests/Support/Data/paracept_5
189189
190190
```
191191

192192
Now we have group files. We should update `codeception.yml` to load generated group files. In our case we have groups: *paracept_1*, *paracept_2*, *paracept_3*, *paracept_4*, *paracept_5*.
193193

194194
```yaml
195195
groups:
196-
paracept_*: tests/_data/paracept_*
196+
paracept_*: tests/Support/Data/paracept_*
197197
```
198198
199199
Let's try to execute tests from the second group:

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