|
@@ 51-63 (lines=13) @@
|
| 48 |
|
}; |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
public function testParameterProviderGetter(): void |
| 52 |
|
{ |
| 53 |
|
$registry = $this->getRegistry([ |
| 54 |
|
$this->getProvider('provider_a'), |
| 55 |
|
$this->getProvider('provider_b'), |
| 56 |
|
]); |
| 57 |
|
|
| 58 |
|
$providerA = $registry->getTwigVariableProvider('provider_a'); |
| 59 |
|
$providerB = $registry->getTwigVariableProvider('provider_b'); |
| 60 |
|
|
| 61 |
|
$this->assertEquals($providerA->getIdentifier(), 'provider_a'); |
| 62 |
|
$this->assertEquals($providerB->getIdentifier(), 'provider_b'); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
public function testParameterNotFoundProviderGetter(): void |
| 66 |
|
{ |
|
@@ 77-92 (lines=16) @@
|
| 74 |
|
$registry->getTwigVariableProvider('provider_c'); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
public function testParameterProviderSetter(): void |
| 78 |
|
{ |
| 79 |
|
$registry = $this->getRegistry([ |
| 80 |
|
$this->getProvider('provider_a'), |
| 81 |
|
$this->getProvider('provider_b'), |
| 82 |
|
]); |
| 83 |
|
|
| 84 |
|
$hasProviderC = $registry->hasTwigVariableProvider('provider_c'); |
| 85 |
|
|
| 86 |
|
$this->assertFalse($hasProviderC); |
| 87 |
|
|
| 88 |
|
$registry->setTwigVariableProvider($this->getProvider('provider_c')); |
| 89 |
|
|
| 90 |
|
$providerC = $registry->getTwigVariableProvider('provider_c'); |
| 91 |
|
$this->assertEquals($providerC->getIdentifier(), 'provider_c'); |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
public function testParameterProviderChecker(): void |
| 95 |
|
{ |