Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kitloong committed Aug 3, 2024
1 parent ca7d318 commit d5a06d9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/Feature/MySQL57/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,30 @@ public function testSkipLog(): void
);
}

public function testSkipLogWithSquash(): void
{
$this->migrateGeneral();
$this->truncateMigrationsTable();
$this->dumpSchemaAs($this->getStorageSqlPath('expected.sql'));

$this->artisan(
'migrate:generate',
[
'--path' => $this->getStorageMigrationsPath(),
'--skip-log' => true,
'--squash' => true,
],
);

$this->assertSame(0, DB::table('migrations')->count());
$this->dumpSchemaAs($this->getStorageSqlPath('actual.sql'));

$this->assertFileEqualsIgnoringOrder(
$this->getStorageSqlPath('expected.sql'),
$this->getStorageSqlPath('actual.sql'),
);
}

public function testLogWithBatch0(): void
{
$this->migrateGeneral();
Expand Down

0 comments on commit d5a06d9

Please sign in to comment.