|
19 | 19 | use Laminas\ModuleManager\Feature\RouteProviderInterface;
|
20 | 20 | use Laminas\ModuleManager\Feature\SerializerProviderInterface;
|
21 | 21 | use Laminas\ModuleManager\Feature\ValidatorProviderInterface;
|
| 22 | +use Laminas\ModuleManager\Feature\ViewHelperProviderInterface; |
22 | 23 | use LaminasTest\ConfigAggregatorModuleManager\Resources\LaminasModule;
|
23 | 24 | use LaminasTest\ConfigAggregatorModuleManager\Resources\LaminasModuleWithInvalidConfiguration;
|
24 | 25 | use LaminasTest\ConfigAggregatorModuleManager\Resources\LaminasModuleWithLaminasConfig;
|
@@ -148,6 +149,21 @@ public function testCanProvideSerializersFromSerializerProviderInterface()
|
148 | 149 | $this->assertSame($this->createServiceManagerConfiguration(), $config['serializers']);
|
149 | 150 | }
|
150 | 151 |
|
| 152 | + public function testCanProviderViewHelpersFromViewHelperProviderInterface() |
| 153 | + { |
| 154 | + $module = $this->createMock(ViewHelperProviderInterface::class); |
| 155 | + $module |
| 156 | + ->expects($this->once()) |
| 157 | + ->method('getViewHelperConfig') |
| 158 | + ->willReturn($this->createServiceManagerConfiguration()); |
| 159 | + |
| 160 | + $provider = new LaminasModuleProvider($module); |
| 161 | + |
| 162 | + $config = $provider(); |
| 163 | + $this->assertArrayHasKey('view_helpers', $config); |
| 164 | + $this->assertSame($this->createServiceManagerConfiguration(), $config['view_helpers']); |
| 165 | + } |
| 166 | + |
151 | 167 | public function testCanProvideAnyConfigValue()
|
152 | 168 | {
|
153 | 169 | $module = new LaminasModule();
|
@@ -191,7 +207,7 @@ public function testCanHandleModulesWithTraversableConfiguration()
|
191 | 207 | $this->assertSame($this->createServiceManagerConfiguration(), $config['dependencies']);
|
192 | 208 | }
|
193 | 209 |
|
194 |
| - public function testCanHandleModuelsWithLaminasConfigConfiguration() |
| 210 | + public function testCanHandleModulesWithLaminasConfigConfiguration() |
195 | 211 | {
|
196 | 212 | $module = new LaminasModuleWithTraversableConfig();
|
197 | 213 | $provider = new LaminasModuleProvider($module);
|
|
0 commit comments