File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
tests/Integration/CachedBuilder Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 10
10
printerClass =" Codedungeon\PHPUnitPrettyResultPrinter\Printer"
11
11
processIsolation =" false"
12
12
stopOnFailure =" false"
13
- syntaxCheck =" false"
14
13
>
15
14
<testsuites >
16
15
<testsuite name =" Feature" >
Original file line number Diff line number Diff line change @@ -97,4 +97,25 @@ public function testWhereClauseParsingOfOperators()
97
97
$ this ->processWhereClauseTestWithOperator ('LIKE ' );
98
98
$ this ->processWhereClauseTestWithOperator ('NOT LIKE ' );
99
99
}
100
+
101
+ public function testTwoWhereClausesAfterEachOther ()
102
+ {
103
+ $ key = sha1 ('genealabs:laravel-model-caching:testing::memory::genealabslaravelmodelcachingtestsfixturesauthor-id_>_-id_<_100 ' );
104
+ $ tags = ['genealabs:laravel-model-caching:testing::memory::genealabslaravelmodelcachingtestsfixturesauthor ' ];
105
+
106
+ $ authors = (new Author )
107
+ ->where ("id " , "> " , 0 )
108
+ ->where ("id " , "< " , 100 )
109
+ ->get ();
110
+ $ cachedResults = $ this ->cache ()
111
+ ->tags ($ tags )
112
+ ->get ($ key )['value ' ];
113
+ $ liveResults = (new UncachedAuthor )
114
+ ->where ("id " , "> " , 0 )
115
+ ->where ("id " , "< " , 100 )
116
+ ->get ();
117
+
118
+ $ this ->assertEmpty ($ authors ->diffKeys ($ cachedResults ));
119
+ $ this ->assertEmpty ($ liveResults ->diffKeys ($ cachedResults ));
120
+ }
100
121
}
You can’t perform that action at this time.
0 commit comments