@@ -37,9 +37,9 @@ public function test_return_when_table_string_empty()
37
37
$ this ->assertFalse (BackupTables::generateBackup ($ emptyArray ));
38
38
}
39
39
40
- public function test_generate_single_table_backup_with_proper_name ()
40
+ public function test_generate_single_table_backup ()
41
41
{
42
- dump ([2 => __FUNCTION__ ]);
42
+ dump ([3 => __FUNCTION__ ]);
43
43
44
44
Carbon::setTestNow ();
45
45
@@ -49,29 +49,7 @@ public function test_generate_single_table_backup_with_proper_name()
49
49
$ newTableName = $ tableName .'_backup_ ' .now ()->format ('Y_m_d_H_i_s ' );
50
50
51
51
$ this ->assertTrue (Schema::hasTable ($ newTableName ));
52
- }
53
-
54
52
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
75
53
$ backupData = DB ::table ($ newTableName )->get ();
76
54
dump ([
77
55
DB ::getDriverName (),
@@ -121,7 +99,7 @@ public function test_generate_single_table_backup_with_different_data()
121
99
122
100
}
123
101
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 ()
125
103
{
126
104
dump ([5 => __FUNCTION__ ]);
127
105
@@ -172,7 +150,7 @@ public function test_generate_2_single_table_backup_all_table_data()
172
150
173
151
public function test_generate_multiple_table_backup ()
174
152
{
175
- dump ([6 => __FUNCTION__ ]);
153
+ dump ([6 => __FUNCTION__ ]);
176
154
177
155
Carbon::setTestNow ();
178
156
$ tableName = 'fathers ' ;
0 commit comments