Skip to content

Commit bda246e

Browse files
committed
Add README how-to for Codeception
1 parent c2975d7 commit bda246e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

+37
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,40 @@ To perform framework-specific checks, include also this file:
9494
```
9595

9696
</details>
97+
98+
99+
## Codeception parameters
100+
101+
This extension work well with [Codeception](https://github.com/Codeception/Codeception) too.
102+
103+
[Unit tests](https://codeception.com/docs/05-UnitTests) are already recognised by default;
104+
[Functional tests](https://codeception.com/docs/04-FunctionalTests) and
105+
[Acceptance tests](https://codeception.com/docs/03-AcceptanceTests) instead hate to be configured
106+
manually since assertion classes are generated at runtime with different namespaces and class names.
107+
108+
Here's an example configuration:
109+
110+
```
111+
112+
services:
113+
-
114+
class: PHPStan\Type\PHPUnit\Assert\AssertMethodTypeSpecifyingExtension
115+
arguments:
116+
classWithAssertionMethods: My\CustomNamespace\_support\FunctionalTester
117+
tags:
118+
- phpstan.typeSpecifier.methodTypeSpecifyingExtension
119+
-
120+
class: PHPStan\Type\PHPUnit\Assert\AssertStaticMethodTypeSpecifyingExtension
121+
arguments:
122+
classWithAssertionMethods: My\CustomNamespace\_support\FunctionalTester
123+
tags:
124+
- phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
125+
126+
parameters:
127+
earlyTerminatingMethodCalls:
128+
My\CustomNamespace\_support\FunctionalTester:
129+
- fail
130+
Codeception\Scenario:
131+
- incomplete
132+
- skip
133+
```

0 commit comments

Comments
 (0)