22
33use Illuminate \Database \Schema \Blueprint ;
44use Illuminate \Support \Facades \Schema ;
5+ use Illuminated \Testing \Asserts \DatabaseAsserts ;
56use Monolog \Logger ;
67
78class DatabaseChannelTest extends TestCase
89{
10+ use DatabaseAsserts;
11+
912 /** @test */
1013 public function it_is_not_storing_notifications_to_database_if_it_is_disabled ()
1114 {
@@ -19,7 +22,7 @@ public function it_stores_notifications_to_database_if_it_is_enabled_and_also_ac
1922 {
2023 $ this ->artisan ('database-notifications-command ' );
2124
22- $ this ->notSeeInDatabaseMany ('iclogger_notifications ' , [
25+ $ this ->dontSeeInDatabaseMany ('iclogger_notifications ' , [
2326 ['level ' => Logger::DEBUG ],
2427 ['level ' => Logger::INFO ],
2528 ]);
@@ -76,7 +79,7 @@ public function it_provides_an_ability_to_use_custom_database_table_and_callback
7679
7780 $ this ->artisan ('database-notifications-callback-command ' );
7881
79- $ this ->notSeeInDatabaseMany ('custom_notifications ' , [
82+ $ this ->dontSeeInDatabaseMany ('custom_notifications ' , [
8083 ['level ' => Logger::DEBUG ],
8184 ['level ' => Logger::INFO ],
8285 ]);
@@ -132,18 +135,4 @@ public function it_provides_an_ability_to_use_custom_database_table_and_callback
132135 ],
133136 ]);
134137 }
135-
136- protected function seeInDatabaseMany ($ table , $ rows )
137- {
138- foreach ($ rows as $ row ) {
139- $ this ->seeInDatabase ($ table , $ row );
140- }
141- }
142-
143- protected function notSeeInDatabaseMany ($ table , $ rows )
144- {
145- foreach ($ rows as $ row ) {
146- $ this ->notSeeInDatabase ($ table , $ row );
147- }
148- }
149138}
0 commit comments