public function __invoke(ServiceLocatorInterface $serviceLocator) { $config = $this->getContainer($serviceLocator)->get('config')['di']['instance']['TweeCdn\\View\\Helper\\Cdn\\AbstractCdn']; return HelperCdnFactory::factory($config['parameters']['type'], $config['parameters']['options']); }
/** * @expectedException \InvalidArgumentException */ public function testLoadUnknown() { $helper = Factory::factory('non-exists', array()); }