@@ -37,22 +37,22 @@ public function testOnce()
3737 $ this ->artisan ('migrate:actions ' )->run ();
3838
3939 $ this ->assertDatabaseCount ($ table , 1 );
40- $ this ->assertDatabaseCount ($ this ->table , 4 );
40+ $ this ->assertDatabaseCount ($ this ->table , 5 );
4141 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , $ table );
4242 $ this ->artisan ('migrate:actions ' )->run ();
4343
4444 $ this ->assertDatabaseCount ($ table , 2 );
45- $ this ->assertDatabaseCount ($ this ->table , 4 );
45+ $ this ->assertDatabaseCount ($ this ->table , 5 );
4646 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , $ table );
4747 $ this ->artisan ('migrate:actions ' )->run ();
4848
4949 $ this ->assertDatabaseCount ($ table , 3 );
50- $ this ->assertDatabaseCount ($ this ->table , 4 );
50+ $ this ->assertDatabaseCount ($ this ->table , 5 );
5151 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , $ table );
5252 $ this ->artisan ('migrate:actions ' )->run ();
5353
5454 $ this ->assertDatabaseCount ($ table , 4 );
55- $ this ->assertDatabaseCount ($ this ->table , 4 );
55+ $ this ->assertDatabaseCount ($ this ->table , 5 );
5656 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , $ table );
5757 }
5858
@@ -88,7 +88,8 @@ public function testFailedTransaction()
8888
8989 try {
9090 $ this ->artisan ('migrate:actions ' )->run ();
91- } catch (Exception $ e ) {
91+ }
92+ catch (Exception $ e ) {
9293 $ this ->assertSame (Exception::class, get_class ($ e ));
9394 $ this ->assertSame ('Random message ' , $ e ->getMessage ());
9495 }
@@ -111,20 +112,26 @@ public function testSingleEnvironment()
111112 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_all ' );
112113 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
113114 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_testing ' );
115+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_production ' );
116+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_testing ' );
114117 $ this ->artisan ('migrate:actions ' )->run ();
115118
116- $ this ->assertDatabaseCount ($ table , 3 );
117- $ this ->assertDatabaseCount ($ this ->table , 4 );
119+ $ this ->assertDatabaseCount ($ table , 4 );
120+ $ this ->assertDatabaseCount ($ this ->table , 5 );
118121 $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_all ' );
119122 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
120123 $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_testing ' );
124+ $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_except_production ' );
125+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_testing ' );
121126 $ this ->artisan ('migrate:actions ' )->run ();
122127
123- $ this ->assertDatabaseCount ($ table , 3 );
124- $ this ->assertDatabaseCount ($ this ->table , 4 );
128+ $ this ->assertDatabaseCount ($ table , 4 );
129+ $ this ->assertDatabaseCount ($ this ->table , 5 );
125130 $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_all ' );
126131 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
127132 $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_testing ' );
133+ $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_except_production ' );
134+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_testing ' );
128135 $ this ->artisan ('migrate:actions ' )->run ();
129136 }
130137
@@ -141,20 +148,32 @@ public function testManyEnvironments()
141148 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_all ' );
142149 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
143150 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_testing ' );
151+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_many_environments ' );
152+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_production ' );
153+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_testing ' );
154+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_many_environments ' );
144155 $ this ->artisan ('migrate:actions ' )->run ();
145156
146- $ this ->assertDatabaseCount ($ table , 3 );
147- $ this ->assertDatabaseCount ($ this ->table , 4 );
157+ $ this ->assertDatabaseCount ($ table , 4 );
158+ $ this ->assertDatabaseCount ($ this ->table , 5 );
148159 $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_all ' );
149160 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
150161 $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_testing ' );
162+ $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_many_environments ' );
163+ $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_except_production ' );
164+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_testing ' );
165+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_many_environments ' );
151166 $ this ->artisan ('migrate:actions ' )->run ();
152167
153- $ this ->assertDatabaseCount ($ table , 3 );
154- $ this ->assertDatabaseCount ($ this ->table , 4 );
168+ $ this ->assertDatabaseCount ($ table , 4 );
169+ $ this ->assertDatabaseCount ($ this ->table , 5 );
155170 $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_all ' );
156171 $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_on_production ' );
157172 $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_testing ' );
173+ $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_on_many_environments ' );
174+ $ this ->assertDatabaseMigrationHas ($ this ->table , 'run_except_production ' );
175+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_testing ' );
176+ $ this ->assertDatabaseMigrationDoesntLike ($ this ->table , 'run_except_many_environments ' );
158177 $ this ->artisan ('migrate:actions ' )->run ();
159178 }
160179
0 commit comments