@@ -410,26 +410,27 @@ public function testSumModelResultsCreatesCache()
410
410
$ this ->assertEquals ($ liveResult , $ cachedResult );
411
411
}
412
412
413
+ /**
414
+ * @group test
415
+ */
413
416
public function testValueModelResultsCreatesCache ()
414
417
{
415
- $ authors = (new Author )->with ('books ' , 'profile ' )
418
+ $ authorName = (new Author )->with ('books ' , 'profile ' )
416
419
->value ('name ' );
417
- $ key = 'genealabslaravelmodelcachingtestsfixturesauthor_name -books-profile-first ' ;
420
+ $ key = 'genealabslaravelmodelcachingtestsfixturesauthor -books-profile-value_name ' ;
418
421
$ tags = [
419
422
'genealabslaravelmodelcachingtestsfixturesauthor ' ,
420
423
'genealabslaravelmodelcachingtestsfixturesbook ' ,
421
424
'genealabslaravelmodelcachingtestsfixturesprofile ' ,
422
425
];
423
426
424
- $ cachedResults = cache ()->tags ($ tags )
425
- ->get ($ key )
426
- ->name ;
427
-
428
- $ liveResults = (new UncachedAuthor )->with ('books ' , 'profile ' )
427
+ $ cachedResult = cache ()->tags ($ tags )
428
+ ->get ($ key );
429
+ $ liveResult = (new UncachedAuthor )->with ('books ' , 'profile ' )
429
430
->value ('name ' );
430
431
431
- $ this ->assertEquals ($ authors , $ cachedResults );
432
- $ this ->assertEquals ($ liveResults , $ cachedResults );
432
+ $ this ->assertEquals ($ authorName , $ cachedResult );
433
+ $ this ->assertEquals ($ authorName , $ liveResult );
433
434
}
434
435
435
436
public function testNestedRelationshipEagerLoading ()
0 commit comments