factory = new SlugifyViewHelperFactory(); } /** * @test * @covers Cocur\Slugify\Bridge\ZF2\SlugifyViewHelperFactory::__invoke() */ public function createService() { $sm = new ServiceManager(); $sm->setService('Cocur\Slugify\Slugify', new Slugify()); $vhm = new HelperPluginManager(); $vhm->setServiceLocator($sm); $viewHelper = call_user_func($this->factory, $vhm); $this->assertInstanceOf('Cocur\Slugify\Bridge\ZF2\SlugifyViewHelper', $viewHelper); } }