Skip to content

Commit

Permalink
Add README how-to for Codeception
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk committed Mar 20, 2020
1 parent c2975d7 commit 5af462c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,39 @@ To perform framework-specific checks, include also this file:
```

</details>


## Codeception parameters

This extension works well with [Codeception](https://github.com/Codeception/Codeception) too.

[Unit tests](https://codeception.com/docs/05-UnitTests) are already recognised by default;
[Functional tests](https://codeception.com/docs/04-FunctionalTests) and
[Acceptance tests](https://codeception.com/docs/03-AcceptanceTests) instead have to be configured
manually since assertion classes are generated at runtime with different namespaces and class names.

Here's an example configuration:

```
services:
-
class: PHPStan\Type\PHPUnit\Assert\AssertMethodTypeSpecifyingExtension
arguments:
classWithAssertionMethods: My\CustomNamespace\_support\FunctionalTester
tags:
- phpstan.typeSpecifier.methodTypeSpecifyingExtension
-
class: PHPStan\Type\PHPUnit\Assert\AssertStaticMethodTypeSpecifyingExtension
arguments:
classWithAssertionMethods: My\CustomNamespace\_support\FunctionalTester
tags:
- phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
parameters:
earlyTerminatingMethodCalls:
My\CustomNamespace\_support\FunctionalTester:
- fail
Codeception\Scenario:
- incomplete
- skip
```

0 comments on commit 5af462c

Please sign in to comment.