@@ -17,22 +17,22 @@ public function it_rollsback_a_patch()
1717 file_get_contents (__DIR__ .'/patches/2021_01_01_000000_my_first_patch.php ' )
1818 );
1919
20- $ this ->assertDatabaseCount (' patches ' , 0 );
20+ $ this ->assertDatabaseCount (config ( ' laravel- patches.table_name ' ) , 0 );
2121
2222 $ this ->artisan ('patch ' )->run ();
2323
24- $ this ->assertDatabaseCount (' patches ' , 1 );
24+ $ this ->assertDatabaseCount (config ( ' laravel- patches.table_name ' ) , 1 );
2525
26- $ this ->assertDatabaseHas (' patches ' , [
26+ $ this ->assertDatabaseHas (config ( ' laravel- patches.table_name ' ) , [
2727 'patch ' => '2021_01_01_000000_my_first_patch ' ,
2828 'batch ' => 1 ,
2929 ]);
3030
3131 $ this ->artisan ('patch:rollback ' )->run ();
3232
33- $ this ->assertDatabaseCount (' patches ' , 0 );
33+ $ this ->assertDatabaseCount (config ( ' laravel- patches.table_name ' ) , 0 );
3434
35- $ this ->assertDatabaseMissing (' patches ' , [
35+ $ this ->assertDatabaseMissing (config ( ' laravel- patches.table_name ' ) , [
3636 'patch ' => '2021_01_01_000000_my_first_patch ' ,
3737 'batch ' => 1 ,
3838 ]);
@@ -56,11 +56,11 @@ public function it_rollsback_all_patches_of_the_previous_batch()
5656
5757 $ this ->artisan ('patch ' )->run ();
5858
59- $ this ->assertDatabaseCount (' patches ' , 2 );
59+ $ this ->assertDatabaseCount (config ( ' laravel- patches.table_name ' ) , 2 );
6060
6161 $ this ->artisan ('patch:rollback ' )->run ();
6262
63- $ this ->assertDatabaseCount (' patches ' , 0 );
63+ $ this ->assertDatabaseCount (config ( ' laravel- patches.table_name ' ) , 0 );
6464 }
6565
6666 /** @test */
@@ -80,24 +80,24 @@ public function it_rollsback_the_correct_patches_with_step()
8080
8181 $ this ->artisan ('patch ' )->run ();
8282
83- $ this ->assertDatabaseHas (' patches ' , [
83+ $ this ->assertDatabaseHas (config ( ' laravel- patches.table_name ' ) , [
8484 'patch ' => '2021_01_01_000000_my_first_patch ' ,
8585 'batch ' => 1 ,
8686 ]);
8787
88- $ this ->assertDatabaseHas (' patches ' , [
88+ $ this ->assertDatabaseHas (config ( ' laravel- patches.table_name ' ) , [
8989 'patch ' => '2021_01_02_000000_my_second_patch ' ,
9090 'batch ' => 1 ,
9191 ]);
9292
9393 $ this ->artisan ('patch:rollback ' , ['--step ' => 1 ])->run ();
9494
95- $ this ->assertDatabaseHas (' patches ' , [
95+ $ this ->assertDatabaseHas (config ( ' laravel- patches.table_name ' ) , [
9696 'patch ' => '2021_01_01_000000_my_first_patch ' ,
9797 'batch ' => 1 ,
9898 ]);
9999
100- $ this ->assertDatabaseMissing (' patches ' , [
100+ $ this ->assertDatabaseMissing (config ( ' laravel- patches.table_name ' ) , [
101101 'patch ' => '2021_01_02_000000_my_second_patch ' ,
102102 'batch ' => 1 ,
103103 ]);
0 commit comments