@@ -25,6 +25,7 @@ public function setUp() : void
25
25
parent ::setUp ();
26
26
27
27
$ this ->loadMigrationsFrom (__DIR__ . '/../../database/migrations ' );
28
+ factory (Author::class, 10 )->create ();
28
29
}
29
30
30
31
public function testWithInUsingCollectionQuery ()
@@ -37,6 +38,7 @@ public function testWithInUsingCollectionQuery()
37
38
$ authors = (new Author )
38
39
->whereJsonContains ("finances->total " , 5000 )
39
40
->get ();
41
+
40
42
$ liveResults = (new UncachedAuthor )
41
43
->whereJsonContains ("finances->total " , 5000 )
42
44
->get ();
@@ -46,6 +48,8 @@ public function testWithInUsingCollectionQuery()
46
48
->tags ($ tags )
47
49
->get ($ key )['value ' ];
48
50
51
+ $ this ->assertCount (10 , $ cachedResults );
52
+ $ this ->assertCount (10 , $ liveResults );
49
53
$ this ->assertEquals ($ liveResults ->pluck ("id " ), $ authors ->pluck ("id " ));
50
54
$ this ->assertEquals ($ liveResults ->pluck ("id " ), $ cachedResults ->pluck ("id " ));
51
55
}
@@ -69,6 +73,8 @@ public function testWithInUsingCollectionQueryWithArrayValues()
69
73
->tags ($ tags )
70
74
->get ($ key )['value ' ];
71
75
76
+ $ this ->assertCount (10 , $ liveResults );
77
+ $ this ->assertCount (10 , $ cachedResults );
72
78
$ this ->assertEquals ($ liveResults ->pluck ("id " ), $ authors ->pluck ("id " ));
73
79
$ this ->assertEquals ($ liveResults ->pluck ("id " ), $ cachedResults ->pluck ("id " ));
74
80
}
0 commit comments