@@ -110,26 +110,26 @@ public function testTwoWhereClausesAfterEachOther()
110110
111111 public function testWhereUsesCorrectBinding ()
112112 {
113- $ key = sha1 ("genealabs:laravel-model-caching:testing: {$ this ->testingSqlitePath }testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-id_>_5 -name_like_B% " );
113+ $ key = sha1 ("genealabs:laravel-model-caching:testing: {$ this ->testingSqlitePath }testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-nested -name_like_B%-name_like_G%-authors.deleted_at_null " );
114114 $ tags = ["genealabs:laravel-model-caching:testing: {$ this ->testingSqlitePath }testing.sqlite:genealabslaravelmodelcachingtestsfixturesauthor " ];
115115
116116 $ authors = (new Author )
117- ->where ("id " , "> " , 2 )
118117 ->where ("name " , "LIKE " , "A% " )
118+ ->orWhere ("name " , "LIKE " , "D% " )
119119 ->get ();
120120 $ authors = (new Author )
121- ->where ("id " , "> " , 5 )
122121 ->where ("name " , "LIKE " , "B% " )
122+ ->orWhere ("name " , "LIKE " , "G% " )
123123 ->get ();
124- $ cachedResults = $ this ->cache ()
124+ $ cachedResults = collect ( $ this ->cache ()
125125 ->tags ($ tags )
126- ->get ($ key )['value ' ];
126+ ->get ($ key )['value ' ]) ;
127127 $ liveResults = (new UncachedAuthor )
128- ->where ("id " , "> " , 5 )
129128 ->where ("name " , "LIKE " , "B% " )
129+ ->orWhere ("name " , "LIKE " , "G% " )
130130 ->get ();
131131
132- $ this ->assertEmpty ( $ authors -> diffKeys ( $ cachedResults ));
133- $ this ->assertEmpty ($ liveResults ->diffKeys ( $ cachedResults ));
132+ $ this ->assertEquals ( $ liveResults -> toArray (), $ authors -> toArray ( ));
133+ $ this ->assertEquals ($ liveResults ->toArray (), $ cachedResults-> toArray ( ));
134134 }
135135}
0 commit comments