mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 04:32:15 +01:00
Fixed tests after adding schema dumps for test database
This commit is contained in:
@@ -5,23 +5,15 @@ declare(strict_types=1);
|
|||||||
namespace Tests\Unit\Database;
|
namespace Tests\Unit\Database;
|
||||||
|
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Tests\TestCase;
|
||||||
|
|
||||||
class MigrationTest extends \Tests\TestCase
|
class MigrationTest extends TestCase
|
||||||
{
|
{
|
||||||
use RefreshDatabase;
|
use RefreshDatabase;
|
||||||
|
|
||||||
public function test_fresh_migration_and_rollback_runs_successfully(): void
|
public function test_fresh_migration_and_rollback_runs_successfully(): void
|
||||||
{
|
{
|
||||||
Artisan::call('migrate:fresh');
|
$this->artisan('migrate:rollback')
|
||||||
Artisan::call('migrate:rollback');
|
->assertSuccessful();
|
||||||
$this->assertTrue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testFreshMigrationWithSeederAndRollbackRunsSuccessfully(): void
|
|
||||||
{
|
|
||||||
Artisan::call('migrate:fresh --seed');
|
|
||||||
Artisan::call('migrate:rollback');
|
|
||||||
$this->assertTrue(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,23 +5,25 @@ declare(strict_types=1);
|
|||||||
namespace Tests\Unit\Database;
|
namespace Tests\Unit\Database;
|
||||||
|
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Tests\TestCase;
|
||||||
|
|
||||||
class SeederTest extends \Tests\TestCase
|
class SeederTest extends TestCase
|
||||||
{
|
{
|
||||||
use RefreshDatabase;
|
use RefreshDatabase;
|
||||||
|
|
||||||
public function test_running_the_seeder_multiple_times_runs_successfully(): void
|
public function test_running_the_seeder_multiple_times_runs_successfully(): void
|
||||||
{
|
{
|
||||||
Artisan::call('db:seed');
|
$this->artisan('db:seed')
|
||||||
Artisan::call('db:seed');
|
->assertSuccessful();
|
||||||
$this->assertTrue(true);
|
$this->artisan('db:seed')
|
||||||
|
->assertSuccessful();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_fresh_migration_with_seeder_and_rollback_runs_successfully(): void
|
public function test_fresh_migration_with_seeder_and_rollback_runs_successfully(): void
|
||||||
{
|
{
|
||||||
Artisan::call('migrate:fresh --seed');
|
$this->artisan('db:seed')
|
||||||
Artisan::call('migrate:rollback');
|
->assertSuccessful();
|
||||||
$this->assertTrue(true);
|
$this->artisan('migrate:rollback')
|
||||||
|
->assertSuccessful();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user