Skip to content

Commit

Permalink
Simpler take for setting the default Site in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
afonic committed May 13, 2024
1 parent 24e7ac6 commit e7c3acb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace Reach\StatamicLivewireFilters\Tests;

use Statamic\Extend\Manifest;
use Statamic\Facades\File;
use Statamic\Facades\YAML;
use Statamic\Facades\Site;

abstract class TestCase extends \Orchestra\Testbench\TestCase
Expand All @@ -23,16 +21,14 @@ protected function setUp(): void
$this->preventSavingStacheItemsToDisk();
}

File::put(resource_path('sites.yaml'), YAML::dump($sites = [
Site::setSites([
'en' => [
'name' => 'English',
'url' => 'http://localhost/',
'locale' => 'en_US',
'lang' => 'en',
],
]));

Site::setSites($sites);
]);
}

public function tearDown(): void
Expand Down

0 comments on commit e7c3acb

Please sign in to comment.