2
2
3
3
use Illuminate \Database \Schema \Blueprint ;
4
4
use Illuminate \Support \Facades \Schema ;
5
+ use Illuminated \Testing \Asserts \DatabaseAsserts ;
5
6
use Monolog \Logger ;
6
7
7
8
class DatabaseChannelTest extends TestCase
8
9
{
10
+ use DatabaseAsserts;
11
+
9
12
/** @test */
10
13
public function it_is_not_storing_notifications_to_database_if_it_is_disabled ()
11
14
{
@@ -19,7 +22,7 @@ public function it_stores_notifications_to_database_if_it_is_enabled_and_also_ac
19
22
{
20
23
$ this ->artisan ('database-notifications-command ' );
21
24
22
- $ this ->notSeeInDatabaseMany ('iclogger_notifications ' , [
25
+ $ this ->dontSeeInDatabaseMany ('iclogger_notifications ' , [
23
26
['level ' => Logger::DEBUG ],
24
27
['level ' => Logger::INFO ],
25
28
]);
@@ -76,7 +79,7 @@ public function it_provides_an_ability_to_use_custom_database_table_and_callback
76
79
77
80
$ this ->artisan ('database-notifications-callback-command ' );
78
81
79
- $ this ->notSeeInDatabaseMany ('custom_notifications ' , [
82
+ $ this ->dontSeeInDatabaseMany ('custom_notifications ' , [
80
83
['level ' => Logger::DEBUG ],
81
84
['level ' => Logger::INFO ],
82
85
]);
@@ -132,18 +135,4 @@ public function it_provides_an_ability_to_use_custom_database_table_and_callback
132
135
],
133
136
]);
134
137
}
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
- }
149
138
}
0 commit comments