diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d0df01..fcf2dfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 2.7.2 - TBD +## 2.7.2 - 2016-06-11 ### Added @@ -19,7 +19,8 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- Nothing. +- [#35](https://github.com/zendframework/zend-navigation/pull/35) fixes errors + in the `ConfigProvider` that prevented its use. ## 2.7.1 - 2016-04-08 diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index a0508df..f05c27f 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -10,7 +10,7 @@ class ConfigProvider { /** - * Return general-purpose zend-i18n configuration. + * Return general-purpose zend-navigation configuration. * * @return array */ @@ -36,10 +36,12 @@ public function getDependencyConfig() 'navigation' => Navigation::class, ], 'delegators' => [ - 'ViewHelperManager' => [ View\ViewHelperManagerDelegatorFactory::class ], + 'ViewHelperManager' => [ + View\ViewHelperManagerDelegatorFactory::class, + ], ], 'factories' => [ - Navigation::class => Service/DefaultNavigationFactory::class, + Navigation::class => Service\DefaultNavigationFactory::class, ], ]; } diff --git a/test/ConfigProviderTest.php b/test/ConfigProviderTest.php new file mode 100644 index 0000000..b1460e4 --- /dev/null +++ b/test/ConfigProviderTest.php @@ -0,0 +1,48 @@ + [ + Service\NavigationAbstractServiceFactory::class, + ], + 'aliases' => [ + 'navigation' => Navigation::class, + ], + 'delegators' => [ + 'ViewHelperManager' => [ + View\ViewHelperManagerDelegatorFactory::class, + ], + ], + 'factories' => [ + Navigation::class => Service\DefaultNavigationFactory::class, + ], + ]; + + public function testProvidesExpectedConfiguration() + { + $provider = new ConfigProvider(); + $this->assertEquals($this->config, $provider->getDependencyConfig()); + return $provider; + } + + /** + * @depends testProvidesExpectedConfiguration + */ + public function testInvocationProvidesDependencyConfiguration(ConfigProvider $provider) + { + $this->assertEquals(['dependencies' => $provider->getDependencyConfig()], $provider()); + } +}