Skip to content

Commit 36dccb7

Browse files
committed
ICL: DatabaseAsserts used.
1 parent 20bfb7f commit 36dccb7

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Loggable/Notifications/DatabaseChannel/DatabaseChannelTest.php

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
use Illuminate\Database\Schema\Blueprint;
44
use Illuminate\Support\Facades\Schema;
5+
use Illuminated\Testing\Asserts\DatabaseAsserts;
56
use Monolog\Logger;
67

78
class 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

Comments
 (0)