Commit 1295255 1 parent 67811c2 commit 1295255 Copy full SHA for 1295255
File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 6
6
use Awssat \Kabsa \Traits \KabsaRelationships ;
7
7
use Illuminate \Database \Eloquent \Model ;
8
8
use Illuminate \Database \Schema \Blueprint ;
9
+ use Illuminate \Support \Facades \DB ;
9
10
use Illuminate \Support \Facades \Redis ;
10
11
use Orchestra \Testbench \TestCase ;
11
12
@@ -26,6 +27,8 @@ public function setUp(): void
26
27
/** @test * */
27
28
public function first_test ()
28
29
{
30
+ DB ::enableQueryLog ();
31
+
29
32
$ user = User::create (['name ' => 'hi ' ]);
30
33
31
34
// Grab a Role.
@@ -37,6 +40,7 @@ public function first_test()
37
40
$ this ->assertEquals ('admin ' , $ user ->role ->label );
38
41
$ this ->assertEquals (3 , Role::count ());
39
42
$ this ->assertEquals ('admin ' , Role::first ()->label );
43
+ $ this ->assertCount (1 , DB ::getQueryLog ());
40
44
}
41
45
42
46
/** @test * */
You can’t perform that action at this time.
0 commit comments