Skip to content

Commit ad99407

Browse files
committed
Use new directory structure in documentation
1 parent 28b87a8 commit ad99407

10 files changed

+40
-40
lines changed

docs/06-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

docs/07-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/08-Customization.md

Lines changed: 5 additions & 5 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

@@ -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/09-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/12-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/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: 5 additions & 5 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

@@ -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

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