Skip to content

Commit 0f58f66

Browse files
committed
Exclude unit tests from Phpstan
Main reason is that Phpstan does not respect phpunit methods like: `markTestSkipped()` and `markTestIncomplete()`. Since tests is pseudo code/tooling I choose to take the approach to skip Phpstan scanning in out unit tests. Read more here: phpstan/phpstan-phpunit#52 (comment)
1 parent e8cabf6 commit 0f58f66

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

phpstan.neon.dist

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ parameters:
55
- web/modules/custom
66
- web/profiles/dpl_cms
77
- web/themes/custom
8+
excludePaths:
9+
- **/tests/src/Unit/*
810
ignoreErrors:
911
- '#Unsafe usage of new static\(\).#'
1012
# Drupal Form API makes extensive use for arrays which we cannot provide

0 commit comments

Comments
 (0)