File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -413,7 +413,7 @@ public function testValueModelResultsCreatesCache()
413413 $ this ->assertEquals ($ liveResults , $ cachedResults );
414414 }
415415
416- public function testNestedRelationshipEagerloading ()
416+ public function testNestedRelationshipEagerLoading ()
417417 {
418418 $ authors = collect ([(new Author )->with ('books.publisher ' )
419419 ->first ()]);
@@ -522,8 +522,19 @@ public function testExistsRelationshipWhereClauseParsing()
522522
523523 public function testColumnsRelationshipWhereClauseParsing ()
524524 {
525- // ???
526- $ this ->markTestIncomplete ();
525+ $ author = (new Author )->orderBy ('name ' )->first ();
526+
527+ $ authors = collect ([(new Author )->where ('name ' , '= ' , $ author ->name )->first ()]);
528+
529+ $ key = 'genealabslaravelmodelcachingtestsfixturesauthor-name_ ' . $ author ->name . '-first ' ;
530+ $ tags = ['genealabslaravelmodelcachingtestsfixturesauthor ' ];
531+
532+ $ cachedResults = collect ([cache ()->tags ($ tags )->get ($ key )]);
533+
534+ $ liveResults = collect ([(new UncachedAuthor )->where ('name ' , '= ' , $ author ->name )->first ()]);
535+
536+ $ this ->assertEmpty ($ authors ->diffAssoc ($ cachedResults ));
537+ $ this ->assertEmpty ($ liveResults ->diffAssoc ($ cachedResults ));
527538 }
528539
529540 public function testRawWhereClauseParsing ()
You can’t perform that action at this time.
0 commit comments