app->make('config')->all(); } $this->markConfigCached($this->app); } /** * Reset the cached configuration. * * This is helpful if some of the tests in the suite apply this trait while others do not. */ protected function tearDownWithCachedConfig(): void { LoadConfiguration::alwaysUse(null); } /** * Inform the container that the configuration is cached. */ protected function markConfigCached(Application $app): void { $app->instance('config_loaded_from_cache', true); LoadConfiguration::alwaysUse(static fn () => CachedState::$cachedConfig); } }