1 | <?php |
||
2 | |||
3 | namespace Ikechukwukalu\Dynamicdatabaseconfig\Tests; |
||
4 | |||
5 | use Ikechukwukalu\Dynamicdatabaseconfig\DynamicDatabaseConfigServiceProvider; |
||
6 | use Illuminate\Foundation\Testing\RefreshDatabase; |
||
7 | use Orchestra\Testbench\TestCase as BaseTestCase; |
||
8 | |||
9 | abstract class TestCase extends BaseTestCase |
||
10 | { |
||
11 | use RefreshDatabase; |
||
12 | |||
13 | public function setUp(): void |
||
14 | { |
||
15 | parent::setUp(); |
||
16 | } |
||
17 | |||
18 | protected function defineDatabaseMigrations() |
||
19 | { |
||
20 | $this->loadLaravelMigrations(); |
||
21 | $this->loadMigrationsFrom(__DIR__.'/../src/migrations'); |
||
22 | } |
||
23 | |||
24 | protected function getPackageProviders($app): array |
||
0 ignored issues
–
show
|
|||
25 | { |
||
26 | return [DynamicDatabaseConfigServiceProvider::class]; |
||
27 | } |
||
28 | |||
29 | protected function getEnvironmentSetUp($app) { |
||
30 | $app['config']->set('auth.guards.sanctum', [ |
||
31 | 'driver' => 'session', |
||
32 | 'provider' => 'users', |
||
33 | ]); |
||
34 | |||
35 | // Setup default database to use sqlite :memory: |
||
36 | $app['config']->set('database.default', 'test_bench'); |
||
37 | $app['config']->set('database.connections.test_bench', [ |
||
38 | 'driver' => 'sqlite', |
||
39 | 'database' => ':memory:', |
||
40 | 'prefix' => '', |
||
41 | ]); |
||
42 | } |
||
43 | } |
||
44 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.