@@ -25,6 +25,7 @@ public function setUp() : void
2525 parent ::setUp ();
2626
2727 $ this ->loadMigrationsFrom (__DIR__ . '/../../database/migrations ' );
28+ factory (Author::class, 10 )->create ();
2829 }
2930
3031 public function testWithInUsingCollectionQuery ()
@@ -37,6 +38,7 @@ public function testWithInUsingCollectionQuery()
3738 $ authors = (new Author )
3839 ->whereJsonContains ("finances->total " , 5000 )
3940 ->get ();
41+
4042 $ liveResults = (new UncachedAuthor )
4143 ->whereJsonContains ("finances->total " , 5000 )
4244 ->get ();
@@ -46,6 +48,8 @@ public function testWithInUsingCollectionQuery()
4648 ->tags ($ tags )
4749 ->get ($ key )['value ' ];
4850
51+ $ this ->assertCount (10 , $ cachedResults );
52+ $ this ->assertCount (10 , $ liveResults );
4953 $ this ->assertEquals ($ liveResults ->pluck ("id " ), $ authors ->pluck ("id " ));
5054 $ this ->assertEquals ($ liveResults ->pluck ("id " ), $ cachedResults ->pluck ("id " ));
5155 }
@@ -69,6 +73,8 @@ public function testWithInUsingCollectionQueryWithArrayValues()
6973 ->tags ($ tags )
7074 ->get ($ key )['value ' ];
7175
76+ $ this ->assertCount (10 , $ liveResults );
77+ $ this ->assertCount (10 , $ cachedResults );
7278 $ this ->assertEquals ($ liveResults ->pluck ("id " ), $ authors ->pluck ("id " ));
7379 $ this ->assertEquals ($ liveResults ->pluck ("id " ), $ cachedResults ->pluck ("id " ));
7480 }
0 commit comments