@@ -160,49 +160,52 @@ jobs:
160160 cd e2e/trait-caching
161161 ../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/
162162 patch -b data/TraitOne.php < TraitOne.patch
163- OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true )
163+ OUTPUT=$(../bashunit -a exit_code "1" " ../../ bin/phpstan analyze --no-progress --level 8 --error-format raw data/" )
164164 echo "$OUTPUT"
165- ../bashunit -a line_count 1 "$OUTPUT"
165+ ../bashunit -a line_count 2 "$OUTPUT"
166+ ../bashunit -a matches "Note: Using configuration file .+phpstan.neon." "$OUTPUT"
166167 ../bashunit -a contains 'Method TraitsCachingIssue\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' "$OUTPUT"
167168 - script : |
168169 cd e2e/trait-caching
169170 ../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/
170171 patch -b data/TraitTwo.php < TraitTwo.patch
171- OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true )
172+ OUTPUT=$(../bashunit -a exit_code "1" " ../../ bin/phpstan analyze --no-progress --level 8 --error-format raw data/" )
172173 echo "$OUTPUT"
173- ../bashunit -a line_count 1 "$OUTPUT"
174+ ../bashunit -a line_count 2 "$OUTPUT"
175+ ../bashunit -a matches "Note: Using configuration file .+phpstan.neon." "$OUTPUT"
174176 ../bashunit -a contains 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' "$OUTPUT"
175177 - script : |
176178 cd e2e/trait-caching
177179 ../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/
178180 patch -b data/TraitOne.php < TraitOne.patch
179181 patch -b data/TraitTwo.php < TraitTwo.patch
180- OUTPUT=$(../../bin/phpstan analyze --no-progress --level 8 --error-format raw data/ || true )
182+ OUTPUT=$(../bashunit -a exit_code "1" " ../../ bin/phpstan analyze --no-progress --level 8 --error-format raw data/" )
181183 echo "$OUTPUT"
182- ../bashunit -a line_count 2 "$OUTPUT"
184+ ../bashunit -a line_count 3 "$OUTPUT"
185+ ../bashunit -a matches "Note: Using configuration file .+phpstan.neon." "$OUTPUT"
183186 ../bashunit -a contains 'Method TraitsCachingIssue\TestClassUsingTrait::doBar() should return stdClass but returns Exception.' "$OUTPUT"
184187 ../bashunit -a contains 'Method class@anonymous/TestClassUsingTrait.php:20::doBar() should return stdClass but returns Exception.' "$OUTPUT"
185188 - script : |
186189 cd e2e/bad-exclude-paths
187- OUTPUT=$(../../bin/phpstan analyse -c ignore.neon 2>&1 || true )
190+ OUTPUT=$(../bashunit -a exit_code "1" " ../../ bin/phpstan analyse -c ignore.neon" )
188191 echo "$OUTPUT"
189192 ../bashunit -a contains 'Invalid entry in ignoreErrors' "$OUTPUT"
190193 ../bashunit -a contains 'tests is neither a directory, nor a file path, nor a fnmatch pattern.' "$OUTPUT"
191194 - script : |
192195 cd e2e/bad-exclude-paths
193- OUTPUT=$(../../bin/phpstan analyse -c phpneon.php 2>&1 || true )
196+ OUTPUT=$(../bashunit -a exit_code "1" " ../../ bin/phpstan analyse -c phpneon.php" )
194197 echo "$OUTPUT"
195198 ../bashunit -a contains 'Invalid entry in ignoreErrors' "$OUTPUT"
196199 ../bashunit -a contains 'src/test.php is neither a directory, nor a file path, nor a fnmatch pattern.' "$OUTPUT"
197200 - script : |
198201 cd e2e/bad-exclude-paths
199- OUTPUT=$(../../bin/phpstan analyse -c excludePaths.neon 2>&1 || true )
202+ OUTPUT=$(../bashunit -a exit_code "1" " ../../ bin/phpstan analyse -c excludePaths.neon" )
200203 echo "$OUTPUT"
201204 ../bashunit -a contains 'Invalid entry in excludePaths' "$OUTPUT"
202205 ../bashunit -a contains 'tests is neither a directory, nor a file path, nor a fnmatch pattern.' "$OUTPUT"
203206 - script : |
204207 cd e2e/bad-exclude-paths
205- OUTPUT=$(../../bin/phpstan analyse -c phpneon2.php 2>&1 || true )
208+ OUTPUT=$(../bashunit -a exit_code "1" " ../../ bin/phpstan analyse -c phpneon2.php" )
206209 echo "$OUTPUT"
207210 ../bashunit -a contains 'Invalid entry in excludePaths' "$OUTPUT"
208211 ../bashunit -a contains 'src/test.php is neither a directory, nor a file path, nor a fnmatch pattern.' "$OUTPUT"
0 commit comments