File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -500,7 +500,18 @@ public function testColumnsRelationshipWhereClauseParsing()
500
500
501
501
public function testRawWhereClauseParsing ()
502
502
{
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 ());
505
516
}
506
517
}
You can’t perform that action at this time.
0 commit comments