17
17
18
18
trait DelegatorTestTrait
19
19
{
20
- public function testDelegatorsOperateOnInvokables () : void
20
+ final public function testDelegatorsOperateOnInvokables () : void
21
21
{
22
22
$ config = [
23
23
'invokables ' => [
@@ -41,7 +41,7 @@ public function testDelegatorsOperateOnInvokables() : void
41
41
self ::assertSame ($ instance , $ container ->get (TestAsset \Service::class));
42
42
}
43
43
44
- public function testDelegatorsDoNotOperateOnServices () : void
44
+ final public function testDelegatorsDoNotOperateOnServices () : void
45
45
{
46
46
$ myService = new TestAsset \Service ();
47
47
$ config = [
@@ -63,7 +63,7 @@ public function testDelegatorsDoNotOperateOnServices() : void
63
63
self ::assertSame ($ myService , $ instance );
64
64
}
65
65
66
- public function testDelegatorsApplyToInvokableServiceResolvedViaAlias () : void
66
+ final public function testDelegatorsApplyToInvokableServiceResolvedViaAlias () : void
67
67
{
68
68
$ config = [
69
69
'aliases ' => [
@@ -91,7 +91,7 @@ public function testDelegatorsApplyToInvokableServiceResolvedViaAlias() : void
91
91
self ::assertSame ($ instance , $ container ->get (TestAsset \Service::class));
92
92
}
93
93
94
- public function testDelegatorsNamedForAliasDoNotApplyToInvokableServiceResolvedViaAlias () : void
94
+ final public function testDelegatorsNamedForAliasDoNotApplyToInvokableServiceResolvedViaAlias () : void
95
95
{
96
96
$ config = [
97
97
'aliases ' => [
@@ -119,7 +119,7 @@ public function testDelegatorsNamedForAliasDoNotApplyToInvokableServiceResolvedV
119
119
self ::assertSame ($ instance , $ container ->get (TestAsset \Service::class));
120
120
}
121
121
122
- public function testDelegatorsNamedForAliasDoNotApplyToInvokableServiceWithAlias () : void
122
+ final public function testDelegatorsNamedForAliasDoNotApplyToInvokableServiceWithAlias () : void
123
123
{
124
124
$ config = [
125
125
'invokables ' => [
@@ -144,7 +144,7 @@ public function testDelegatorsNamedForAliasDoNotApplyToInvokableServiceWithAlias
144
144
self ::assertSame ($ instance , $ container ->get (TestAsset \Service::class));
145
145
}
146
146
147
- public function testDelegatorsDoNotApplyToAliasResolvingToServiceEntry () : void
147
+ final public function testDelegatorsDoNotApplyToAliasResolvingToServiceEntry () : void
148
148
{
149
149
$ myService = new TestAsset \Service ();
150
150
$ config = [
@@ -176,7 +176,7 @@ public function testDelegatorsDoNotApplyToAliasResolvingToServiceEntry() : void
176
176
self ::assertSame ($ instance , $ container ->get ('foo-bar ' ));
177
177
}
178
178
179
- public function testDelegatorsDoNotTriggerForAliasTargetingInvokableService () : void
179
+ final public function testDelegatorsDoNotTriggerForAliasTargetingInvokableService () : void
180
180
{
181
181
$ config = [
182
182
'aliases ' => [
@@ -204,7 +204,7 @@ public function testDelegatorsDoNotTriggerForAliasTargetingInvokableService() :
204
204
self ::assertSame ($ instance , $ container ->get (TestAsset \Service::class));
205
205
}
206
206
207
- public function delegatorService () : Generator
207
+ final public function delegatorService () : Generator
208
208
{
209
209
yield 'invokable ' => [
210
210
[
@@ -249,7 +249,7 @@ public function delegatorService() : Generator
249
249
/**
250
250
* @dataProvider delegatorService
251
251
*/
252
- public function testDelegatorsReceiveCallbackResolvingToReturnValueOfPrevious (
252
+ final public function testDelegatorsReceiveCallbackResolvingToReturnValueOfPrevious (
253
253
array $ config ,
254
254
string $ serviceNameToTest ,
255
255
string $ delegatedServiceName
@@ -280,7 +280,7 @@ public function testDelegatorsReceiveCallbackResolvingToReturnValueOfPrevious(
280
280
self ::assertSame ($ instance , $ container ->get ($ serviceNameToTest ));
281
281
}
282
282
283
- public function testMultipleAliasesForADelegatedInvokableServiceReceiveSameInstance ()
283
+ final public function testMultipleAliasesForADelegatedInvokableServiceReceiveSameInstance () : void
284
284
{
285
285
$ container = $ this ->createContainer ([
286
286
'invokables ' => [
@@ -317,7 +317,7 @@ public function testMultipleAliasesForADelegatedInvokableServiceReceiveSameInsta
317
317
/**
318
318
* @dataProvider delegatorService
319
319
*/
320
- public function testNonInvokableDelegatorClassNameResultsInExceptionDuringInstanceRetrieval (
320
+ final public function testNonInvokableDelegatorClassNameResultsInExceptionDuringInstanceRetrieval (
321
321
array $ config ,
322
322
string $ serviceNameToTest ,
323
323
string $ delegatedServiceName
@@ -338,7 +338,7 @@ public function testNonInvokableDelegatorClassNameResultsInExceptionDuringInstan
338
338
/**
339
339
* @dataProvider delegatorService
340
340
*/
341
- public function testNonExistentDelegatorClassResultsInExceptionDuringInstanceRetrieval (
341
+ final public function testNonExistentDelegatorClassResultsInExceptionDuringInstanceRetrieval (
342
342
array $ config ,
343
343
string $ serviceNameToTest ,
344
344
string $ delegatedServiceName
@@ -359,7 +359,7 @@ public function testNonExistentDelegatorClassResultsInExceptionDuringInstanceRet
359
359
/**
360
360
* @dataProvider delegatorService
361
361
*/
362
- public function testDelegatorClassNameRequiringConstructorArgumentsResultsInExceptionDuringInstanceRetrieval (
362
+ final public function testDelegatorClassNameRequiringConstructorArgumentsResultsInExceptionDuringInstanceRetrieval (
363
363
array $ config ,
364
364
string $ serviceNameToTest ,
365
365
string $ delegatedServiceName
@@ -382,7 +382,7 @@ function () use ($container, $serviceNameToTest) {
382
382
);
383
383
}
384
384
385
- public function factoriesForDelegators () : Generator
385
+ final public function factoriesForDelegators () : Generator
386
386
{
387
387
yield 'function-name ' => [['factories ' => ['service ' => __NAMESPACE__ . '\TestAsset\factory ' ]]];
388
388
yield 'invokable-class-name ' => [['factories ' => ['service ' => TestAsset \Factory::class]]];
@@ -403,7 +403,7 @@ public function factoriesForDelegators() : Generator
403
403
/**
404
404
* @dataProvider factoriesForDelegators
405
405
*/
406
- public function testDelegatorFactoriesTriggerForFactoryBackedServicesUsingAnyFactoryType (array $ config )
406
+ final public function testDelegatorFactoriesTriggerForFactoryBackedServicesUsingAnyFactoryType (array $ config ) : void
407
407
{
408
408
$ config += [
409
409
'delegators ' => [
@@ -427,7 +427,7 @@ public function testDelegatorFactoriesTriggerForFactoryBackedServicesUsingAnyFac
427
427
/**
428
428
* @dataProvider factoriesForDelegators
429
429
*/
430
- public function testDelegatorsTriggerForFactoryServiceResolvedByAlias (array $ config ) : void
430
+ final public function testDelegatorsTriggerForFactoryServiceResolvedByAlias (array $ config ) : void
431
431
{
432
432
$ config += [
433
433
'aliases ' => [
@@ -459,7 +459,7 @@ public function testDelegatorsTriggerForFactoryServiceResolvedByAlias(array $con
459
459
/**
460
460
* @dataProvider factoriesForDelegators
461
461
*/
462
- public function testDelegatorsDoNotTriggerForAliasTargetingFactoryBasedServiceUsingAnyFactoryType (
462
+ final public function testDelegatorsDoNotTriggerForAliasTargetingFactoryBasedServiceUsingAnyFactoryType (
463
463
array $ config
464
464
) : void {
465
465
$ config += [
@@ -485,7 +485,7 @@ public function testDelegatorsDoNotTriggerForAliasTargetingFactoryBasedServiceUs
485
485
self ::assertSame ($ instance , $ container ->get ('service ' ));
486
486
}
487
487
488
- public function invalidService ()
488
+ final public function invalidService ()
489
489
{
490
490
yield 'non-existent-invokable ' => [
491
491
['invokables ' => [TestAsset \NonExistent::class]],
@@ -560,7 +560,7 @@ public function invalidService()
560
560
/**
561
561
* @dataProvider invalidService
562
562
*/
563
- public function testWithDelegatorsResolvesToInvalidClassNoExceptionIsRaisedIfCallbackNeverInvoked (
563
+ final public function testWithDelegatorsResolvesToInvalidClassNoExceptionIsRaisedIfCallbackNeverInvoked (
564
564
array $ config ,
565
565
string $ serviceNameToTest ,
566
566
string $ delegatedServiceName
@@ -581,7 +581,7 @@ public function testWithDelegatorsResolvesToInvalidClassNoExceptionIsRaisedIfCal
581
581
/**
582
582
* @dataProvider invalidService
583
583
*/
584
- public function testWithDelegatorsResolvesToInvalidClassAnExceptionIsRaisedWhenCallbackIsInvoked (
584
+ final public function testWithDelegatorsResolvesToInvalidClassAnExceptionIsRaisedWhenCallbackIsInvoked (
585
585
array $ config ,
586
586
string $ serviceNameToTest ,
587
587
string $ delegatedServiceName
0 commit comments