File tree 1 file changed +16
-2
lines changed
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -482,8 +482,22 @@ public function testOrderByClauseParsing()
482
482
483
483
public function testNestedRelationshipWhereClauseParsing ()
484
484
{
485
- // -> with('modelA.modelB')
486
- $ this ->markTestIncomplete ();
485
+ $ authors = collect ([(new Author )
486
+ ->with ('books.publisher ' )->where ('name ' ,'<> ' ,'' )->first ()]);
487
+
488
+ $ key = 'genealabslaravelmodelcachingtestsfixturesauthor-name_-books-books.publisher-first ' ;
489
+ $ tags = [
490
+ 'genealabslaravelmodelcachingtestsfixturesauthor ' ,
491
+ 'genealabslaravelmodelcachingtestsfixturesbook ' ,
492
+ 'genealabslaravelmodelcachingtestsfixturespublisher ' ,
493
+ ];
494
+
495
+ $ cachedResults = collect ([cache ()->tags ($ tags )->get ($ key )]);
496
+
497
+ $ liveResults = collect ([(new UncachedAuthor )->with ('books.publisher ' )->where ('name ' ,'<> ' ,'' )->first ()]);
498
+
499
+ $ this ->assertEmpty ($ authors ->diffAssoc ($ cachedResults ));
500
+ $ this ->assertEmpty ($ liveResults ->diffAssoc ($ cachedResults ));
487
501
}
488
502
489
503
public function testExistsRelationshipWhereClauseParsing ()
You can’t perform that action at this time.
0 commit comments