testXmlPath = __DIR__ . '/temp/sitemap.xml'; parent::setUp(); File::ensureDirectoryExists(dirname($this->testXmlPath)); } #[\Override] protected function tearDown(): void { if (File::exists($this->testXmlPath)) { File::delete($this->testXmlPath); } parent::tearDown(); } #[\Override] protected function getPackageProviders($app): array { return [ SitemapGeneratorServiceProvider::class, SitemapServiceProvider::class, ]; } #[\Override] protected function defineEnvironment($app): void { $app['config']->set('database.default', 'testing'); $app['config']->set('database.connections.testing', [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '', ]); $app['config']->set(SitemapConfig::CONFIG_KEY . '.output_path', $this->testXmlPath); $app['config']->set(SitemapConfig::CONFIG_KEY . '.supported_locales', ['fr', 'en']); $app['config']->set(SitemapConfig::CONFIG_KEY . '.single_pages', []); $app['config']->set(SitemapConfig::CONFIG_KEY . '.cruds', []); $app['config']->set(SitemapConfig::CONFIG_KEY . '.cron', '45 15 * * *'); $app['config']->set(SitemapConfig::CONFIG_KEY . '.schedule', false); $app['config']->set(SitemapConfig::CONFIG_KEY . '.localizer', 'default'); } }