Skip to content

Commit

Permalink
E2E test about path validation in ignoreErrors and excludePaths
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Aug 3, 2024
1 parent e05b9d6 commit 9246976
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ jobs:
../bashunit -a line_count 2 "$OUTPUT"
../bashunit -a contains 'Method TraitsCachingIssue\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' "$OUTPUT"
../bashunit -a contains 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' "$OUTPUT"
- script: |
cd e2e/bad-exclude-paths
OUTPUT=$(../../bin/phpstan analyse -c ignore.neon)
echo "$OUTPUT"
../bashunit -a contains 'Invalid entry in ignoreErrors' "$OUTPUT"
../bashunit -a contains 'tests is neither a directory, nor a file path, nor a fnmatch pattern.' "$OUTPUT"
- script: |
cd e2e/bad-exclude-paths
OUTPUT=$(../../bin/phpstan analyse -c excludePaths.neon)
echo "$OUTPUT"
../bashunit -a contains 'Invalid entry in excludePaths' "$OUTPUT"
../bashunit -a contains 'tests is neither a directory, nor a file path, nor a fnmatch pattern.' "$OUTPUT"
steps:
- name: "Checkout"
Expand Down
9 changes: 9 additions & 0 deletions e2e/bad-exclude-paths/excludePaths.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
includes:
- ../../conf/bleedingEdge.neon

parameters:
level: 8
paths:
- src
excludePaths:
- tests
11 changes: 11 additions & 0 deletions e2e/bad-exclude-paths/ignore.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
includes:
- ../../conf/bleedingEdge.neon

parameters:
level: 8
paths:
- src
ignoreErrors:
-
message: '#aaa#'
path: tests
Empty file.

0 comments on commit 9246976

Please sign in to comment.