@@ -415,26 +415,20 @@ public function testValueModelResultsCreatesCache()
415415
416416 public function testNestedRelationshipEagerloading ()
417417 {
418- $ authors = collect ()->push (
419- (new Author )->with ('books.publisher ' )
420- ->first ()
421- );
418+ $ authors = collect ([(new Author )->with ('books.publisher ' )
419+ ->first ()]);
420+
422421 $ key = 'genealabslaravelmodelcachingtestsfixturesauthor-books-books.publisher-first ' ;
423422 $ tags = [
424423 'genealabslaravelmodelcachingtestsfixturesauthor ' ,
425424 'genealabslaravelmodelcachingtestsfixturesbook ' ,
426425 'genealabslaravelmodelcachingtestsfixturespublisher ' ,
427426 ];
428427
429- $ cachedResults = collect ()->push (
430- cache ()->tags ($ tags )
431- ->get ($ key )
432- );
433-
434- $ liveResults = collect ()->push (
435- (new UncachedAuthor )->with ('books.publisher ' )
436- ->first ()
437- );
428+ $ cachedResults = collect ([cache ()->tags ($ tags )
429+ ->get ($ key )]);
430+ $ liveResults = collect ([(new UncachedAuthor )->with ('books.publisher ' )
431+ ->first ()]);
438432
439433 $ this ->assertEmpty ($ authors ->diffAssoc ($ cachedResults ));
440434 $ this ->assertEmpty ($ liveResults ->diffAssoc ($ cachedResults ));
@@ -443,7 +437,7 @@ public function testNestedRelationshipEagerloading()
443437 public function testLazyLoadedRelationshipResolvesThroughCachedBuilder ()
444438 {
445439 $ books = (new Author )->first ()->books ;
446- $ key = 'genealabslaravelmodelcachingtestsfixturesbook-books.author_id_1 ' ;
440+ $ key = 'genealabslaravelmodelcachingtestsfixturesbook-books.author_id_1-books.author_id_notnull ' ;
447441 $ tags = [
448442 'genealabslaravelmodelcachingtestsfixturesbook ' ,
449443 ];
@@ -458,7 +452,7 @@ public function testLazyLoadedRelationshipResolvesThroughCachedBuilder()
458452 public function testLazyLoadingOnResourceIsCached ()
459453 {
460454 $ books = (new AuthorResource ((new Author )->first ()))->books ;
461- $ key = 'genealabslaravelmodelcachingtestsfixturesbook-books.author_id_1 ' ;
455+ $ key = 'genealabslaravelmodelcachingtestsfixturesbook-books.author_id_1-books.author_id_notnull ' ;
462456 $ tags = [
463457 'genealabslaravelmodelcachingtestsfixturesbook ' ,
464458 ];
0 commit comments