outputDisk = 'local'; $this->outputPath = __DIR__ . '/temp/sitemap.xml'; parent::setUp(); File::ensureDirectoryExists(dirname($this->outputPath)); } #[\Override] protected function tearDown(): void { if (File::exists($this->outputPath)) { File::delete($this->outputPath); } 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.storage_disk', $this->outputDisk); $app['config']->set(SitemapConfig::CONFIG_KEY . '.output.path', $this->outputPath); $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'); } }