first commit
This commit is contained in:
21
tests/TestCase.php
Normal file
21
tests/TestCase.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
// Журнал аудита хранится в отдельном соединении (мера РСБ.3). В тестах
|
||||
// это in-memory sqlite — создаём схему журнала для каждого теста.
|
||||
Artisan::call('migrate:fresh', [
|
||||
'--database' => config('audit.connection'),
|
||||
'--path' => 'database/migrations/audit',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user