@@ -27,9 +27,9 @@ public function testRollbackCommand()
27
27
$ this ->assertDatabaseHasTable ($ this ->table );
28
28
$ this ->assertDatabaseCount ($ this ->table , 2 );
29
29
30
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'rollback_one ' );
31
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'rollback_two ' );
32
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'rollback_tree ' );
30
+ $ this ->assertDatabaseActionHas ($ this ->table , 'rollback_one ' );
31
+ $ this ->assertDatabaseActionHas ($ this ->table , 'rollback_two ' );
32
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'rollback_tree ' );
33
33
34
34
$ this ->artisan (Names::ROLLBACK )->assertExitCode (0 );
35
35
@@ -47,9 +47,9 @@ public function testRollbackCommand()
47
47
$ this ->assertDatabaseHasTable ($ this ->table );
48
48
$ this ->assertDatabaseCount ($ this ->table , 3 );
49
49
50
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'rollback_one ' );
51
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'rollback_two ' );
52
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'rollback_tree ' );
50
+ $ this ->assertDatabaseActionHas ($ this ->table , 'rollback_one ' );
51
+ $ this ->assertDatabaseActionHas ($ this ->table , 'rollback_two ' );
52
+ $ this ->assertDatabaseActionHas ($ this ->table , 'rollback_tree ' );
53
53
}
54
54
55
55
public function testEnvironment ()
@@ -62,27 +62,27 @@ public function testEnvironment()
62
62
63
63
$ this ->assertDatabaseCount ($ table , 0 );
64
64
$ this ->assertDatabaseCount ($ this ->table , 0 );
65
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_all ' );
66
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
67
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_testing ' );
68
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_many_environments ' );
65
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_all ' );
66
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_production ' );
67
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_testing ' );
68
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_many_environments ' );
69
69
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
70
70
71
71
$ this ->assertDatabaseCount ($ table , 5 );
72
72
$ this ->assertDatabaseCount ($ this ->table , 12 );
73
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_all ' );
74
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
75
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_testing ' );
76
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_many_environments ' );
73
+ $ this ->assertDatabaseActionHas ($ this ->table , 'run_on_all ' );
74
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_production ' );
75
+ $ this ->assertDatabaseActionHas ($ this ->table , 'run_on_testing ' );
76
+ $ this ->assertDatabaseActionHas ($ this ->table , 'run_on_many_environments ' );
77
77
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
78
78
79
79
$ this ->artisan (Names::ROLLBACK )->assertExitCode (0 );
80
80
$ this ->assertDatabaseCount ($ table , 10 );
81
81
$ this ->assertDatabaseCount ($ this ->table , 0 );
82
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_all ' );
83
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
84
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_testing ' );
85
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_many_environments ' );
82
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_all ' );
83
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_production ' );
84
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_testing ' );
85
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_on_many_environments ' );
86
86
}
87
87
88
88
public function testDownSuccess ()
@@ -95,17 +95,17 @@ public function testDownSuccess()
95
95
96
96
$ this ->assertDatabaseCount ($ table , 0 );
97
97
$ this ->assertDatabaseCount ($ this ->table , 0 );
98
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_success ' );
98
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_success ' );
99
99
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
100
100
101
101
$ this ->assertDatabaseCount ($ table , 2 );
102
102
$ this ->assertDatabaseCount ($ this ->table , 12 );
103
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_success ' );
103
+ $ this ->assertDatabaseActionHas ($ this ->table , 'run_success ' );
104
104
105
105
$ this ->artisan (Names::ROLLBACK )->assertExitCode (0 );
106
106
$ this ->assertDatabaseCount ($ table , 4 );
107
107
$ this ->assertDatabaseCount ($ this ->table , 0 );
108
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_success ' );
108
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_success ' );
109
109
}
110
110
111
111
public function testDownSuccessOnFailed ()
@@ -118,12 +118,12 @@ public function testDownSuccessOnFailed()
118
118
119
119
$ this ->assertDatabaseCount ($ table , 0 );
120
120
$ this ->assertDatabaseCount ($ this ->table , 0 );
121
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_success_on_failed ' );
121
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_success_on_failed ' );
122
122
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
123
123
124
124
$ this ->assertDatabaseCount ($ table , 2 );
125
125
$ this ->assertDatabaseCount ($ this ->table , 12 );
126
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_success_on_failed ' );
126
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_success_on_failed ' );
127
127
128
128
try {
129
129
$ this ->copySuccessFailureMethod ();
@@ -132,7 +132,7 @@ public function testDownSuccessOnFailed()
132
132
133
133
$ this ->assertDatabaseCount ($ table , 2 );
134
134
$ this ->assertDatabaseCount ($ this ->table , 13 );
135
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_success_on_failed ' );
135
+ $ this ->assertDatabaseActionHas ($ this ->table , 'run_success_on_failed ' );
136
136
137
137
$ this ->artisan (Names::ROLLBACK )->assertExitCode (1 );
138
138
}
@@ -146,7 +146,7 @@ public function testDownSuccessOnFailed()
146
146
147
147
$ this ->assertDatabaseCount ($ table , 2 );
148
148
$ this ->assertDatabaseCount ($ this ->table , 13 );
149
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_success_on_failed ' );
149
+ $ this ->assertDatabaseActionHas ($ this ->table , 'run_success_on_failed ' );
150
150
}
151
151
152
152
public function testDownFailed ()
@@ -159,17 +159,17 @@ public function testDownFailed()
159
159
160
160
$ this ->assertDatabaseCount ($ table , 0 );
161
161
$ this ->assertDatabaseCount ($ this ->table , 0 );
162
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_failed ' );
162
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_failed ' );
163
163
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
164
164
165
165
$ this ->assertDatabaseCount ($ table , 0 );
166
166
$ this ->assertDatabaseCount ($ this ->table , 12 );
167
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_failed ' );
167
+ $ this ->assertDatabaseActionHas ($ this ->table , 'run_failed ' );
168
168
169
169
$ this ->artisan (Names::ROLLBACK )->assertExitCode (0 );
170
170
$ this ->assertDatabaseCount ($ table , 0 );
171
171
$ this ->assertDatabaseCount ($ this ->table , 0 );
172
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_failed ' );
172
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_failed ' );
173
173
}
174
174
175
175
public function testUpFailedOnException ()
@@ -182,12 +182,12 @@ public function testUpFailedOnException()
182
182
183
183
$ this ->assertDatabaseCount ($ table , 0 );
184
184
$ this ->assertDatabaseCount ($ this ->table , 0 );
185
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_failed_failure ' );
185
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_failed_failure ' );
186
186
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
187
187
188
188
$ this ->assertDatabaseCount ($ table , 0 );
189
189
$ this ->assertDatabaseCount ($ this ->table , 12 );
190
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_failed_failure ' );
190
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'run_failed_failure ' );
191
191
192
192
try {
193
193
$ this ->copyFailedMethod ();
@@ -206,7 +206,7 @@ public function testUpFailedOnException()
206
206
207
207
$ this ->assertDatabaseCount ($ table , 1 );
208
208
$ this ->assertDatabaseCount ($ this ->table , 13 );
209
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_failed_failure ' );
209
+ $ this ->assertDatabaseActionHas ($ this ->table , 'run_failed_failure ' );
210
210
}
211
211
212
212
public function testDisabledBefore ()
@@ -219,22 +219,22 @@ public function testDisabledBefore()
219
219
220
220
$ this ->assertDatabaseCount ($ table , 0 );
221
221
$ this ->assertDatabaseCount ($ this ->table , 0 );
222
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_enabled ' );
223
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_disabled ' );
222
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_enabled ' );
223
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_disabled ' );
224
224
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
225
225
226
226
$ this ->assertDatabaseCount ($ table , 2 );
227
227
$ this ->assertDatabaseCount ($ this ->table , 12 );
228
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'test_before_enabled ' );
229
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'test_before_disabled ' );
228
+ $ this ->assertDatabaseActionHas ($ this ->table , 'test_before_enabled ' );
229
+ $ this ->assertDatabaseActionHas ($ this ->table , 'test_before_disabled ' );
230
230
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
231
231
232
232
$ this ->artisan (Names::ROLLBACK )->assertExitCode (0 );
233
233
234
234
$ this ->assertDatabaseCount ($ table , 4 );
235
235
$ this ->assertDatabaseCount ($ this ->table , 0 );
236
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_enabled ' );
237
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_disabled ' );
236
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_enabled ' );
237
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_disabled ' );
238
238
}
239
239
240
240
public function testEnabledBefore ()
@@ -247,22 +247,22 @@ public function testEnabledBefore()
247
247
248
248
$ this ->assertDatabaseCount ($ table , 0 );
249
249
$ this ->assertDatabaseCount ($ this ->table , 0 );
250
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_enabled ' );
251
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_disabled ' );
250
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_enabled ' );
251
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_disabled ' );
252
252
$ this ->artisan (Names::ACTIONS , ['--before ' => true ])->assertExitCode (0 );
253
253
254
254
$ this ->assertDatabaseCount ($ table , 1 );
255
255
$ this ->assertDatabaseCount ($ this ->table , 11 );
256
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'test_before_enabled ' );
257
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_disabled ' );
256
+ $ this ->assertDatabaseActionHas ($ this ->table , 'test_before_enabled ' );
257
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_disabled ' );
258
258
$ this ->artisan (Names::ACTIONS , ['--before ' => true ])->assertExitCode (0 );
259
259
260
260
$ this ->artisan (Names::ROLLBACK )->assertExitCode (0 );
261
261
262
262
$ this ->assertDatabaseCount ($ table , 2 );
263
263
$ this ->assertDatabaseCount ($ this ->table , 0 );
264
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_enabled ' );
265
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'test_before_disabled ' );
264
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_enabled ' );
265
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'test_before_disabled ' );
266
266
}
267
267
268
268
public function testDI (): void
@@ -275,32 +275,32 @@ public function testDI(): void
275
275
276
276
$ this ->assertDatabaseCount ($ table , 0 );
277
277
$ this ->assertDatabaseCount ($ this ->table , 0 );
278
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'invoke ' );
279
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'invoke_down ' );
280
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'up_down ' );
281
- $ this ->assertDatabaseMigrationDoesntLike ($ table , 'up_down ' , column: 'value ' );
282
- $ this ->assertDatabaseMigrationDoesntLike ($ table , 'invoke_down ' , column: 'value ' );
283
- $ this ->assertDatabaseMigrationDoesntLike ($ table , 'invoke ' , column: 'value ' );
278
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'invoke ' );
279
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'invoke_down ' );
280
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'up_down ' );
281
+ $ this ->assertDatabaseActionDoesntLike ($ table , 'up_down ' , column: 'value ' );
282
+ $ this ->assertDatabaseActionDoesntLike ($ table , 'invoke_down ' , column: 'value ' );
283
+ $ this ->assertDatabaseActionDoesntLike ($ table , 'invoke ' , column: 'value ' );
284
284
$ this ->artisan (Names::ACTIONS )->assertExitCode (0 );
285
285
286
286
$ this ->assertDatabaseCount ($ table , 3 );
287
287
$ this ->assertDatabaseCount ($ this ->table , 3 );
288
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'invoke ' );
289
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'invoke_down ' );
290
- $ this ->assertDatabaseMigrationHas ($ this ->table , 'up_down ' );
291
- $ this ->assertDatabaseMigrationHas ($ table , 'up_down ' , column: 'value ' );
292
- $ this ->assertDatabaseMigrationHas ($ table , 'invoke_down ' , column: 'value ' );
293
- $ this ->assertDatabaseMigrationHas ($ table , 'invoke ' , column: 'value ' );
288
+ $ this ->assertDatabaseActionHas ($ this ->table , 'invoke ' );
289
+ $ this ->assertDatabaseActionHas ($ this ->table , 'invoke_down ' );
290
+ $ this ->assertDatabaseActionHas ($ this ->table , 'up_down ' );
291
+ $ this ->assertDatabaseActionHas ($ table , 'up_down ' , column: 'value ' );
292
+ $ this ->assertDatabaseActionHas ($ table , 'invoke_down ' , column: 'value ' );
293
+ $ this ->assertDatabaseActionHas ($ table , 'invoke ' , column: 'value ' );
294
294
295
295
$ this ->artisan (Names::ROLLBACK )->assertExitCode (0 );
296
296
297
297
$ this ->assertDatabaseCount ($ table , 2 );
298
298
$ this ->assertDatabaseCount ($ this ->table , 0 );
299
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'invoke ' );
300
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'invoke_down ' );
301
- $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'up_down ' );
302
- $ this ->assertDatabaseMigrationDoesntLike ($ table , 'up_down ' , column: 'value ' );
303
- $ this ->assertDatabaseMigrationHas ($ table , 'invoke_down ' , column: 'value ' );
304
- $ this ->assertDatabaseMigrationHas ($ table , 'invoke ' , column: 'value ' );
299
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'invoke ' );
300
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'invoke_down ' );
301
+ $ this ->assertDatabaseActionDoesntLike ($ this ->table , 'up_down ' );
302
+ $ this ->assertDatabaseActionDoesntLike ($ table , 'up_down ' , column: 'value ' );
303
+ $ this ->assertDatabaseActionHas ($ table , 'invoke_down ' , column: 'value ' );
304
+ $ this ->assertDatabaseActionHas ($ table , 'invoke ' , column: 'value ' );
305
305
}
306
306
}
0 commit comments