@@ -110,26 +110,26 @@ public function testTwoWhereClausesAfterEachOther()
110
110
111
111
public function testWhereUsesCorrectBinding ()
112
112
{
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 " );
114
114
$ tags = ["genealabs:laravel-model-caching:testing: {$ this ->testingSqlitePath }testing.sqlite:genealabslaravelmodelcachingtestsfixturesauthor " ];
115
115
116
116
$ authors = (new Author )
117
- ->where ("id " , "> " , 2 )
118
117
->where ("name " , "LIKE " , "A% " )
118
+ ->orWhere ("name " , "LIKE " , "D% " )
119
119
->get ();
120
120
$ authors = (new Author )
121
- ->where ("id " , "> " , 5 )
122
121
->where ("name " , "LIKE " , "B% " )
122
+ ->orWhere ("name " , "LIKE " , "G% " )
123
123
->get ();
124
- $ cachedResults = $ this ->cache ()
124
+ $ cachedResults = collect ( $ this ->cache ()
125
125
->tags ($ tags )
126
- ->get ($ key )['value ' ];
126
+ ->get ($ key )['value ' ]) ;
127
127
$ liveResults = (new UncachedAuthor )
128
- ->where ("id " , "> " , 5 )
129
128
->where ("name " , "LIKE " , "B% " )
129
+ ->orWhere ("name " , "LIKE " , "G% " )
130
130
->get ();
131
131
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 ( ));
134
134
}
135
135
}
0 commit comments