[13.x] Fix order-dependent tests
While working through the test suite, I noticed "test pollution" when certain sub-suites are run directly. CI runs the full suite in a fixed order, so it's not always noticed. But if you shuffle it with --order-by=random, run a file on its own, or change a test filename unrelated tests start failing.
This PR improves resetting state where it leaks, mostly in setUp and tearDown, and gives tests that were quietly borrowing another test's app or connection their own. A few had worse side effects: SupportFacadesHttpTest made a real request to laravel.com when run alone, and FoundationHelpersTest left hot, mix-manifest.json and a mix/ directory in tests/Foundation whenever an assertion failed partway.
Most of the fixes are one-liners, but two are worth knowing about.
- Orchestra Testbench disables Laravel's
putenvadapter when it creates an app and only restores it on terminate, so a Testbench test that just flushes its app breaksputenvfor later tests.LoadEnvironmentVariablesTestre-enables it; Testbench tests use#[WithEnv]instead ofputenv(). Vite::flush()only clears the font manifest cache through an instance the app may never have created.