Skip to content

Commit

Permalink
Clear language folder before test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoraddatz committed Dec 11, 2023
1 parent 521dd2c commit 1bf5916
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/Feature/GetLocaleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@
use Illuminate\Support\Facades\Cache;

beforeEach(function () {
//$lang = 'en';
//$langPath = realpath(__DIR__ . '/../../resources/lang');
File::deleteDirectory(lang_path() . '/en');

if (! File::exists(lang_path('en'))) {
File::makeDirectory(lang_path() . '/en', 0755, true);
File::put(lang_path() . '/en/test.php', "<?php return ['title' => 'Test'];");
}
});

afterEach(function () {
File::deleteDirectory(lang_path() . '/en');
});

it('uses cache for storing locale data', function () {
$locale = 'en';

Expand Down

0 comments on commit 1bf5916

Please sign in to comment.