Skip to content

Commit 3f56147

Browse files
committed
Fix E2E tests
1 parent 50135a9 commit 3f56147

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,18 @@ jobs:
137137
../../bin/phpstan -vvv
138138
- script: |
139139
cd e2e/env-parameter
140-
export PHPSTAN_SCOPE_CLASS=MyTestScope
141-
ACTUAL=$(../../bin/phpstan dump-parameters -c phpstan.neon --json -l 9 | jq --raw-output '.scopeClass')
142-
[[ "$ACTUAL" == "MyTestScope" ]];
140+
export PHPSTAN_RESULT_CACHE_PATH=/some/path
141+
ACTUAL=$(../../bin/phpstan dump-parameters -c phpstan.neon --json -l 9 | jq --raw-output '.resultCachePath')
142+
[[ "$ACTUAL" == "/some/path" ]];
143143
- script: |
144144
cd e2e/result-cache-8
145145
composer install
146146
../../bin/phpstan
147147
echo -en '\n' >> build/CustomRule.php
148-
OUTPUT=$(../../bin/phpstan 2>&1)
149-
grep 'Result cache might not behave correctly' <<< "$OUTPUT"
150-
grep 'ResultCache8E2E\\CustomRule' <<< "$OUTPUT"
148+
OUTPUT=$(../../bin/phpstan analyze 2>&1 || true)
149+
echo "$OUTPUT"
150+
../bashunit -a contains 'Result cache might not behave correctly' "$OUTPUT"
151+
../bashunit -a contains 'ResultCache8E2E\\CustomRule' "$OUTPUT"
151152
- script: |
152153
cd e2e/env-int-key
153154
env 1=1 ../../bin/phpstan analyse test.php

e2e/bug-9622-trait/baseline-1.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Offset 'foo' does not exist on array\\{foo\\?\\: int\\}\\.$#"
4+
message: "#^Offset 'foo' might not exist on array\\{foo\\?\\: int\\}\\.$#"
55
count: 1
66
path: src/UsesBar.php

e2e/bug-9622/baseline-1.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Offset 'foo' does not exist on array\\{foo\\?\\: int\\}\\.$#"
4+
message: "#^Offset 'foo' might not exist on array\\{foo\\?\\: int\\}\\.$#"
55
count: 1
66
path: src/Bar.php

e2e/discussion-11362/phpstan.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
parameters:
22
excludePaths:
3-
analyseAndScan:
4-
- .git
53
analyse:
64
- vendor
75

e2e/env-parameter/phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
parameters:
2-
scopeClass: %env.PHPSTAN_SCOPE_CLASS%
2+
resultCachePath: %env.PHPSTAN_RESULT_CACHE_PATH%

e2e/result-cache-5/phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ parameters:
55
level: 8
66
paths:
77
- src
8+
ignoreErrors:
9+
-
10+
identifier: instanceof.alwaysTrue

e2e/result-cache-7/phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ parameters:
55
level: 8
66
paths:
77
- src
8+
ignoreErrors:
9+
-
10+
identifier: trait.unused

0 commit comments

Comments
 (0)