File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -482,8 +482,22 @@ public function testOrderByClauseParsing()
482482
483483 public function testNestedRelationshipWhereClauseParsing ()
484484 {
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 ));
487501 }
488502
489503 public function testExistsRelationshipWhereClauseParsing ()
You can’t perform that action at this time.
0 commit comments