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 @@ -510,8 +510,19 @@ public function testExistsRelationshipWhereClauseParsing()
510
510
511
511
public function testColumnsRelationshipWhereClauseParsing ()
512
512
{
513
- // ???
514
- $ this ->markTestIncomplete ();
513
+ $ author = (new Author )->orderBy ('name ' )->first ();
514
+
515
+ $ authors = collect ([(new Author )->where ('name ' , '= ' , $ author ->name )->first ()]);
516
+
517
+ $ key = 'genealabslaravelmodelcachingtestsfixturesauthor-name_ ' . $ author ->name . '-first ' ;
518
+ $ tags = ['genealabslaravelmodelcachingtestsfixturesauthor ' ];
519
+
520
+ $ cachedResults = collect ([cache ()->tags ($ tags )->get ($ key )]);
521
+
522
+ $ liveResults = collect ([(new UncachedAuthor )->where ('name ' , '= ' , $ author ->name )->first ()]);
523
+
524
+ $ this ->assertEmpty ($ authors ->diffAssoc ($ cachedResults ));
525
+ $ this ->assertEmpty ($ liveResults ->diffAssoc ($ cachedResults ));
515
526
}
516
527
517
528
public function testRawWhereClauseParsing ()
You can’t perform that action at this time.
0 commit comments