Skip to content

Commit 9246976

Browse files
committed
E2E test about path validation in ignoreErrors and excludePaths
1 parent e05b9d6 commit 9246976

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

.github/workflows/e2e-tests.yml

+12
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,18 @@ jobs:
214214
../bashunit -a line_count 2 "$OUTPUT"
215215
../bashunit -a contains 'Method TraitsCachingIssue\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' "$OUTPUT"
216216
../bashunit -a contains 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' "$OUTPUT"
217+
- script: |
218+
cd e2e/bad-exclude-paths
219+
OUTPUT=$(../../bin/phpstan analyse -c ignore.neon)
220+
echo "$OUTPUT"
221+
../bashunit -a contains 'Invalid entry in ignoreErrors' "$OUTPUT"
222+
../bashunit -a contains 'tests is neither a directory, nor a file path, nor a fnmatch pattern.' "$OUTPUT"
223+
- script: |
224+
cd e2e/bad-exclude-paths
225+
OUTPUT=$(../../bin/phpstan analyse -c excludePaths.neon)
226+
echo "$OUTPUT"
227+
../bashunit -a contains 'Invalid entry in excludePaths' "$OUTPUT"
228+
../bashunit -a contains 'tests is neither a directory, nor a file path, nor a fnmatch pattern.' "$OUTPUT"
217229
218230
steps:
219231
- name: "Checkout"
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
includes:
2+
- ../../conf/bleedingEdge.neon
3+
4+
parameters:
5+
level: 8
6+
paths:
7+
- src
8+
excludePaths:
9+
- tests

e2e/bad-exclude-paths/ignore.neon

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
includes:
2+
- ../../conf/bleedingEdge.neon
3+
4+
parameters:
5+
level: 8
6+
paths:
7+
- src
8+
ignoreErrors:
9+
-
10+
message: '#aaa#'
11+
path: tests

e2e/bad-exclude-paths/src/test.php

Whitespace-only changes.

0 commit comments

Comments
 (0)