Skip to content

Commit 66cf568

Browse files
SanderMullerclaude
authored andcommitted
Test the --debug report of a bootstrap autoloader's exception end to end
The debug-class-loader e2e step now runs the analysis with --debug as well, and checks that it prints the exception DebugClassLoader threw for the unknown class. This replaces BootstrapFilesRunnerTest. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 988c598 commit 66cf568

2 files changed

Lines changed: 5 additions & 77 deletions

File tree

‎.github/workflows/e2e-tests.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ jobs:
232232
cd e2e/debug-class-loader
233233
composer install
234234
../../bin/phpstan analyze
235+
# With --debug, the analysis runs in the main process, and PHPStan prints the
236+
# exception that DebugClassLoader threw for the unknown class.
237+
OUTPUT=$(../bashunit assert exit_code "0" "../../bin/phpstan analyze --debug")
238+
echo "$OUTPUT"
239+
../bashunit assert contains 'by a bootstrap autoloader for class DebugClassLoaderE2e\Widget: The autoloader expected class' "$OUTPUT"
235240
- script: |
236241
cd e2e/bug-12972c
237242
composer install

‎tests/PHPStan/Command/BootstrapFilesRunnerTest.php‎

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)