Skip to content

fix(tests): move Pest.php imports to the top - #209

Merged
bobbyiliev merged 2 commits into
mainfrom
fix/test-suite
Nov 8, 2026
Merged

bobbyiliev merged 2 commits into
mainfrom
fix/test-suite

Conversation

@bobbyiliev

Copy link
Copy Markdown
Contributor

The test suite has been failing on main since July with The class DuskTestCase was not found.

A pint run (6efaa96) swapped the fully qualified class names in tests/Pest.php for short ones, but the use imports ended up at the bottom of the file, after the uses() / pest()->extend() calls that need them. PHP only applies imports to code after them, so DuskTestCase and TestCase resolved to the global namespace. Moved the imports to the top, pint is happy with it so the lint workflow shouldn't undo it again.

Also made EmailVerificationCodeTest set a username when the users table has that column, so it can run in apps like Wave that require one.

…username column

A pint run moved the use statements below the uses() / pest()->extend() calls, so DuskTestCase and TestCase resolved to the global namespace and every test run failed with 'The class DuskTestCase was not found'.
The per-process compiled view folder (storage/framework/views/test_N) isn't created before the first view compiles with laravel 13, so the first request in a worker 500s. The suite is ~120 tests so running it serially is fine.
@bobbyiliev
bobbyiliev merged commit 3e98d9c into main Nov 8, 2026
5 checks passed
@bobbyiliev
bobbyiliev deleted the fix/test-suite branch November 8, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant