File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -734,7 +734,7 @@ public function testWhereClauseParsingOfOperators()
734734 $ this ->processWhereClauseTestWithOperator ('NOT LIKE ' );
735735 }
736736
737- public function testWhereBetweenResults ()
737+ public function testWhereBetweenIdsResults ()
738738 {
739739 $ books = (new Book )
740740 ->whereBetween ('price ' , [5 , 10 ])
@@ -753,4 +753,24 @@ public function testWhereBetweenResults()
753753 $ this ->assertTrue ($ cachedResults ->diffKeys ($ books )->isEmpty ());
754754 $ this ->assertTrue ($ liveResults ->diffKeys ($ books )->isEmpty ());
755755 }
756+
757+ public function testWhereBetweenDatesResults ()
758+ {
759+ $ books = (new Book )
760+ ->whereBetween ('created_at ' , ['2018-01-01 ' , '2018-12-31 ' ])
761+ ->get ();
762+ $ key = sha1 ('genealabslaravelmodelcachingtestsfixturesbook-created_at_between_2018-01-01_2018-12-31 ' );
763+ $ tags = [
764+ 'genealabslaravelmodelcachingtestsfixturesbook ' ,
765+ ];
766+
767+ $ cachedResults = cache ()->tags ($ tags )
768+ ->get ($ key );
769+ $ liveResults = (new UncachedAuthor )
770+ ->whereBetween ('price ' , [5 , 10 ])
771+ ->get ();
772+
773+ $ this ->assertTrue ($ cachedResults ->diffKeys ($ books )->isEmpty ());
774+ $ this ->assertTrue ($ liveResults ->diffKeys ($ books )->isEmpty ());
775+ }
756776}
You can’t perform that action at this time.
0 commit comments