| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | abstract class TestCase extends OrchestraTestCase |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Setup the test environment. |
||
| 15 | */ |
||
| 16 | protected function setUp(): void |
||
| 17 | { |
||
| 18 | parent::setUp(); |
||
| 19 | |||
| 20 | $this->loadMigrationsFrom(__DIR__ . '/database/migrations'); |
||
| 21 | $this->registerEloquentFactoriesFrom(__DIR__ . '/database/factories'); |
||
| 22 | |||
| 23 | $this->artisan('db:seed', [ |
||
| 24 | '--class' => PostTestSeeder::class, |
||
| 25 | ]); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Register factories. |
||
| 30 | * |
||
| 31 | * @param string $path |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | protected function registerEloquentFactoriesFrom($path): void |
||
| 36 | { |
||
| 37 | $this->app->make(EloquentFactory::class)->load($path); |
||
| 38 | } |
||
| 40 |