Skip to content

Commit

Permalink
refactor: now() to $now in one of the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WatheqAlshowaiter committed Jan 28, 2025
1 parent f84a835 commit 70fb63d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/BackupTableCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ public function it_can_backup_multiple_tables()
public function it_can_backup_multiple_models()
{
$models = [Father::class, Mother::class];
$now = now();

$this->artisan('backup:tables', ['targets' => $models])
->assertExitCode(BackupTableCommand::SUCCESS);

$backupTablePattern1 = 'fathers_backup_'.now()->format('Y_m_d_H_i_s');
$backupTablePattern2 = 'mothers_backup_'.now()->format('Y_m_d_H_i_s');
$backupTablePattern1 = 'fathers_backup_'.$now->format('Y_m_d_H_i_s');
$backupTablePattern2 = 'mothers_backup_'.$now->format('Y_m_d_H_i_s');

$this->assertTrue(Schema::hasTable($backupTablePattern1));

Expand Down

0 comments on commit 70fb63d

Please sign in to comment.