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()
413
413
$ this ->assertEquals ($ liveResults , $ cachedResults );
414
414
}
415
415
416
- public function testNestedRelationshipEagerloading ()
416
+ public function testNestedRelationshipEagerLoading ()
417
417
{
418
418
$ authors = collect ([(new Author )->with ('books.publisher ' )
419
419
->first ()]);
@@ -522,8 +522,19 @@ public function testExistsRelationshipWhereClauseParsing()
522
522
523
523
public function testColumnsRelationshipWhereClauseParsing ()
524
524
{
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 ));
527
538
}
528
539
529
540
public function testRawWhereClauseParsing ()
You can’t perform that action at this time.
0 commit comments