Skip to content

Commit f3f0375

Browse files
committed
ITT: New database assertions added.
1 parent e6d67ae commit f3f0375

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Asserts/DatabaseAsserts.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,20 @@
22

33
namespace Illuminated\Testing\Asserts;
44

5+
use Illuminate\Support\Facades\Schema;
6+
57
trait DatabaseAsserts
68
{
9+
protected function seeDatabaseTable($table)
10+
{
11+
$this->assertTrue(Schema::hasTable($table), "Failed asserting that database has table `{$table}`.");
12+
}
13+
14+
protected function dontSeeDatabaseTable($table)
15+
{
16+
$this->assertFalse(Schema::hasTable($table), "Failed asserting that database not has table `{$table}`.");
17+
}
18+
719
protected function seeInDatabaseMany($table, array $rows)
820
{
921
foreach ($rows as $row) {

0 commit comments

Comments
 (0)