-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTestCase.php
49 lines (42 loc) · 1017 Bytes
/
TestCase.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
declare(strict_types=1);
namespace Korridor\LaravelHasManySync\Tests;
use Illuminate\Database\Capsule\Manager;
use Korridor\LaravelHasManySync\ServiceProvider;
use Illuminate\Foundation\Application;
use Orchestra\Testbench\TestCase as Orchestra;
abstract class TestCase extends Orchestra
{
/**
* Setup the test environment.
*
* @return void
*/
public function setUp(): void
{
parent::setUp();
$this->loadMigrationsFrom(__DIR__ . '/TestEnvironment/Migrations');
}
/**
* Define environment setup.
*
* @param Application $app
* @return void
*/
protected function getEnvironmentSetUp($app): void
{
$app->setBasePath(__DIR__ . '/TestEnvironment');
}
/**
* Get package providers.
*
* @param Application $app
* @return array<int, class-string>
*/
protected function getPackageProviders($app): array
{
return [
ServiceProvider::class,
];
}
}