File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -500,7 +500,18 @@ public function testColumnsRelationshipWhereClauseParsing()
500500
501501 public function testRawWhereClauseParsing ()
502502 {
503- // ->whereRaw(...)
504- $ this ->markTestIncomplete ();
503+ $ authors = collect ([(new Author )
504+ ->whereRaw ('name <> \'\'' )->first ()]);
505+
506+ $ key = 'genealabslaravelmodelcachingtestsfixturesauthor_and_name-first ' ;
507+ $ tags = ['genealabslaravelmodelcachingtestsfixturesauthor ' ];
508+
509+ $ cachedResults = collect ([cache ()->tags ($ tags )->get ($ key )]);
510+
511+ $ liveResults = collect ([(new UncachedAuthor )
512+ ->whereRaw ('name <> \'\'' )->first ()]);
513+
514+ $ this ->assertTrue ($ authors ->diffAssoc ($ cachedResults )->isEmpty ());
515+ $ this ->assertTrue ($ liveResults ->diffAssoc ($ cachedResults )->isEmpty ());
505516 }
506517}
You can’t perform that action at this time.
0 commit comments