ikechukwukalu /
dynamicdatabaseconfig
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Ikechukwukalu\Dynamicdatabaseconfig\Tests; |
||
| 4 | |||
| 5 | use Illuminate\Foundation\Testing\RefreshDatabase; |
||
| 6 | use Ikechukwukalu\Dynamicdatabaseconfig\Models\DatabaseConfiguration; |
||
| 7 | use Ikechukwukalu\Dynamicdatabaseconfig\Tests\Seeders\DatabaseConfigurationSeeder; |
||
| 8 | |||
| 9 | class CommandTest extends TestCase |
||
| 10 | { |
||
| 11 | use RefreshDatabase; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 12 | |||
| 13 | public function test_fires_dynamic_database_config_commands(): void |
||
| 14 | { |
||
| 15 | |||
| 16 | // $this->artisan('database:env-migrate test_bench test_bench_one ONE --path=database/migrations')->assertSuccessful(); |
||
| 17 | |||
| 18 | $this->seed(DatabaseConfigurationSeeder::class); |
||
| 19 | |||
| 20 | $this->artisan('dynamic:migrate one --path=database/migrations')->assertSuccessful(); |
||
| 21 | |||
| 22 | $this->artisan('dynamic:migrate one --seed --path=database/migrations')->assertSuccessful(); |
||
| 23 | |||
| 24 | $this->artisan('dynamic:migrate one --refresh --path=database/migrations')->assertSuccessful(); |
||
| 25 | |||
| 26 | $this->artisan('dynamic:migrate one --fresh --path=database/migrations')->assertSuccessful(); |
||
| 27 | |||
| 28 | $this->artisan('dynamic:seed one --seed')->assertSuccessful(); |
||
| 29 | |||
| 30 | $this->artisan('vendor:publish --tag=ddc-config')->assertSuccessful(); |
||
| 31 | |||
| 32 | $this->artisan('vendor:publish --tag=ddc-migrations')->assertSuccessful(); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |