From 24e7ac6444197069059528adc68298c1a1e64279 Mon Sep 17 00:00:00 2001 From: Iosif Chatzimichail Date: Mon, 13 May 2024 12:21:47 +0300 Subject: [PATCH] Another take --- tests/TestCase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 32716ca..896143b 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -5,6 +5,7 @@ use Statamic\Extend\Manifest; use Statamic\Facades\File; use Statamic\Facades\YAML; +use Statamic\Facades\Site; abstract class TestCase extends \Orchestra\Testbench\TestCase { @@ -22,10 +23,7 @@ protected function setUp(): void $this->preventSavingStacheItemsToDisk(); } - dd(resource_path('sites.yaml')); - - // We changed the default sites setup but the tests assume defaults like the following. - File::put(resource_path('sites.yaml'), YAML::dump([ + File::put(resource_path('sites.yaml'), YAML::dump($sites = [ 'en' => [ 'name' => 'English', 'url' => 'http://localhost/', @@ -33,6 +31,8 @@ protected function setUp(): void 'lang' => 'en', ], ])); + + Site::setSites($sites); } public function tearDown(): void