/** * Create service * * @param ServiceLocatorInterface $serviceLocator * @return AchievementProviderPluginManager */ public function createService(ServiceLocatorInterface $serviceLocator) { /** @var ModuleOptions $mapOptions */ $moduleOptions = $serviceLocator->get('AxalianAchievements\\Options\\ModuleOptions'); $pluginManager = new AchievementProviderPluginManager(new Config($moduleOptions->getAchievementProviders())); $pluginManager->setServiceLocator($serviceLocator); return $pluginManager; }
/** * @expectedException \AxalianAchievements\Exception\RuntimeException */ public function testIfExceptionThrownOnInvalidPlugin() { $plugin = \Mockery::mock('FooInterface'); $this->pluginManager->validatePlugin($plugin); }