88
99namespace LiamWiltshire \LaravelJitLoader \Tests \Concerns ;
1010
11- use Illuminate \Log \LogManager ;
1211use LiamWiltshire \LaravelJitLoader \Tests \TestCase ;
1312use LiamWiltshire \LaravelJitLoader \Tests \TraitlessModel ;
1413use LiamWiltshire \LaravelJitLoader \Tests \TraitModel ;
@@ -27,7 +26,7 @@ public function testGetRelationshipFromMethodWithNonExistentRelationshipThrowsEx
2726 public function testGetRelationshipFromMethodAfterDisableAutoLoadCalledDoesntAutoLoad ()
2827 {
2928 $ models = TraitModel::all ();
30- $ related = $ models [0 ]->disableAutoload ()->myRelationship ;
29+ $ models [0 ]->disableAutoload ()->myRelationship ;
3130
3231 $ this ->assertFalse ($ models [1 ]->relationLoaded ('myRelationship ' ));
3332 }
@@ -36,7 +35,7 @@ public function testGetRelationshipFromMethodOverThresholdDoesntAutoLoad()
3635 {
3736 $ models = TraitModel::all ();
3837 $ models [0 ]->setAutoloadThreshold (2 );
39- $ related = $ models [0 ]->myRelationship ;
38+ $ models [0 ]->myRelationship ;
4039
4140 $ this ->assertFalse ($ models [1 ]->relationLoaded ('myRelationship ' ));
4241 }
@@ -45,14 +44,13 @@ public function testGetRelationshipFromMethodOverThresholdDoesntAutoLoad()
4544 public function testGetRelationshipFromMethodUnderThresholdDoesAutoLoad ()
4645 {
4746 $ models = TraitModel::all ();
48- $ related = $ models [0 ]->myRelationship ;
47+ $ models [0 ]->myRelationship ;
4948
5049 $ this ->assertTrue ($ models [1 ]->relationLoaded ('myRelationship ' ));
5150 }
5251
5352 public function testGetRelationshipFromMethodUnderThresholdDoesAutoLoadWithLogging ()
5453 {
55-
5654 $ message = "[LARAVEL-JIT-LOADER] Relationship " . TraitModel::class . "::myRelationship was JIT-loaded. Called in " . __FILE__ . " on line " . (__LINE__ + 12 );
5755
5856 $ driver = $ this ->getMockBuilder (LoggerInterface::class)->getMock ();
@@ -65,7 +63,7 @@ public function testGetRelationshipFromMethodUnderThresholdDoesAutoLoadWithLoggi
6563 $ models = TraitModel::all ();
6664 $ models [0 ]->setLogging ('jitLogger ' , $ driver );
6765
68- $ related = $ models [0 ]->myRelationship ;
66+ $ models [0 ]->myRelationship ;
6967
7068 $ this ->assertTrue ($ models [1 ]->relationLoaded ('myRelationship ' ));
7169 }
@@ -116,4 +114,4 @@ public function testPerformance()
116114 $ this ->assertTrue ($ traitedCount < $ traitlessCount );
117115 $ this ->assertTrue ($ traitedTime < $ traitlessTime );
118116 }
119- }
117+ }
0 commit comments