Skip to content

Commit 412c1d6

Browse files
Update 2022-07-28-codeception-5.markdown
1 parent 9a45e9b commit 412c1d6

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

_posts/2022-07-28-codeception-5.markdown

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,31 @@ extensions:
6767
- Codeception\Extension\RunFailed
6868
```
6969
70+
Next steps:
71+
72+
1. Rename your suite configuration files:
73+
`acceptance.suite.yml` => `Acceptance.suite.yml`
74+
`functional.suite.yml` => `Functional.suite.yml`
75+
`unit.suite.yml` => `Unit.suite.yml`
76+
2. Inside those configuration files, update to the new namespace:
77+
```yaml
78+
modules:
79+
enabled:
80+
- Tests\Support\Helper\Unit
81+
```
82+
3. In your `composer.json`, update to the new namespace:
83+
```json
84+
"autoload-dev": {
85+
"psr-4": {
86+
"Tests\\": "tests/"
87+
}
88+
},
89+
```
90+
4. In your `tests/Support/Acceptance|Functional|UnitTester.php` files, update to the new namespace.
91+
5. Run `vendor/bin/codecept build` to create the files in `tests/Support/_generated`.
92+
6. Modify the namespaces in all your test/cest files.
93+
7. Run the tests with capitalized suite names: `vendor/bin/codecept run Unit`
94+
7095
## Attributes
7196

7297
Annotations were an essential part of the Codeception testing framework. Even though they were not native language constructs, they proved to be quite good to separate a test from its metadata. We believe that test should not include code that doesn't belong to the test scenario.

0 commit comments

Comments
 (0)