@@ -194,26 +194,26 @@ jobs:
194
194
patch -b data/TraitOne.php < TraitOne.patch
195
195
OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true)
196
196
echo "$OUTPUT"
197
- [ $(echo "$OUTPUT" | wc -l) -eq 1 ]
198
- grep 'Method TraitsCachingIssue\\ TestClassUsingTrait::doBar() should return stdClass but returns Exception.' <<< "$OUTPUT"
197
+ ../bashunit -a line_count 1 "$OUTPUT"
198
+ ../bashunit -a contains 'Method TraitsCachingIssue\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' "$OUTPUT"
199
199
- script : |
200
200
cd e2e/trait-caching
201
201
../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/
202
202
patch -b data/TraitTwo.php < TraitTwo.patch
203
203
OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true)
204
204
echo "$OUTPUT"
205
- [ $(echo "$OUTPUT" | wc -l) -eq 1 ]
206
- grep 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' <<< "$OUTPUT"
205
+ ../bashunit -a line_count 1 "$OUTPUT"
206
+ ../bashunit -a contains 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' "$OUTPUT"
207
207
- script : |
208
208
cd e2e/trait-caching
209
209
../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/
210
210
patch -b data/TraitOne.php < TraitOne.patch
211
211
patch -b data/TraitTwo.php < TraitTwo.patch
212
212
OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true)
213
213
echo "$OUTPUT"
214
- [ $(echo "$OUTPUT" | wc -l) -eq 2 ]
215
- grep 'Method TraitsCachingIssue\\ TestClassUsingTrait::doBar() should return stdClass but returns Exception.' <<< "$OUTPUT"
216
- grep 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' <<< "$OUTPUT"
214
+ ../bashunit -a line_count 2 "$OUTPUT"
215
+ ../bashunit -a contains 'Method TraitsCachingIssue\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' "$OUTPUT"
216
+ ../bashunit -a contains 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' "$OUTPUT"
217
217
218
218
steps :
219
219
- name : " Checkout"
@@ -233,6 +233,9 @@ jobs:
233
233
- name : " Patch PHPStan"
234
234
run : " patch src/Analyser/Error.php < e2e/PHPStanErrorPatch.patch"
235
235
236
+ - name : " Install bashunit"
237
+ run : " curl -s https://bashunit.typeddevs.com/install.sh | bash -s e2e/ beta"
238
+
236
239
- name : " Test"
237
240
run : " ${{ matrix.script }}"
238
241
0 commit comments