Add local setup for S3

This commit is contained in:
Constantin Graf
2024-09-09 22:30:24 +02:00
committed by Constantin Graf
parent fc614b796c
commit 9a8945b0dc
9 changed files with 115 additions and 18 deletions

View File

@@ -11,6 +11,7 @@ use Illuminate\Database\Eloquent\Collection;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Storage;
use Mockery\MockInterface;
use TiMacDonald\Log\LogFake;
@@ -25,6 +26,16 @@ abstract class TestCase extends BaseTestCase
LogFake::bind();
}
protected function mockPrivateStorage(): void
{
Storage::fake(config('filesystems.default'));
}
protected function mockPublicStorage(): void
{
Storage::fake(config('filesystems.public'));
}
protected function tearDown(): void
{
// Note: It is necessary to clear the permission cache after each test, since the "scoped singletons" are not reset between tests.