Skip to content

Commit c82b607

Browse files
WIP: change tests order
1 parent 48f1ea3 commit c82b607

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

tests/BackupTablesTest.php

+4-26
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public function test_return_when_table_string_empty()
3737
$this->assertFalse(BackupTables::generateBackup($emptyArray));
3838
}
3939

40-
public function test_generate_single_table_backup_with_proper_name()
40+
public function test_generate_single_table_backup()
4141
{
42-
dump([2 => __FUNCTION__]);
42+
dump([3 => __FUNCTION__]);
4343

4444
Carbon::setTestNow();
4545

@@ -49,29 +49,7 @@ public function test_generate_single_table_backup_with_proper_name()
4949
$newTableName = $tableName.'_backup_'.now()->format('Y_m_d_H_i_s');
5050

5151
$this->assertTrue(Schema::hasTable($newTableName));
52-
}
53-
5452

55-
public function test_generate_single_table_backup_all_table_data()
56-
{
57-
dump([3=> __FUNCTION__]);
58-
59-
Carbon::setTestNow();
60-
$tableName = 'fathers';
61-
62-
Father::create([
63-
'first_name' => 'Ahmed',
64-
'last_name' => 'Saleh',
65-
'email' => 'father@email.com',
66-
]);
67-
68-
BackupTables::generateBackup($tableName);
69-
70-
$newTableName = $tableName.'_backup_'.now()->format('Y_m_d_H_i_s');
71-
72-
$this->assertTrue(Schema::hasTable($newTableName));
73-
74-
// todo Debugging output to inspect the contents of the backup table
7553
$backupData = DB::table($newTableName)->get();
7654
dump([
7755
DB::getDriverName(),
@@ -121,7 +99,7 @@ public function test_generate_single_table_backup_with_different_data()
12199

122100
}
123101

124-
public function test_generate_2_single_table_backup_all_table_data()
102+
public function test_generate_single_table_backup_then_another_table_backup_later()
125103
{
126104
dump([5 => __FUNCTION__]);
127105

@@ -172,7 +150,7 @@ public function test_generate_2_single_table_backup_all_table_data()
172150

173151
public function test_generate_multiple_table_backup()
174152
{
175-
dump([6 => __FUNCTION__]);
153+
dump([6=> __FUNCTION__]);
176154

177155
Carbon::setTestNow();
178156
$tableName = 'fathers';

0 commit comments

Comments
 (0)