示例#1
0
 public function testFactoryReturnsProperConfiguredInstanceOfAuthViewHelperAuth()
 {
     $f = new AuthFactory();
     $sm = new ServiceManager();
     $auth = $this->getMockBuilder('\\Zend\\Authentication\\AuthenticationService')->getMock();
     $sm->setService('AuthenticationService', $auth);
     $hm = new HelperPluginManager();
     $hm->setServicelocator($sm);
     $helper = $f->createService($hm);
     $this->assertInstanceOf('\\Auth\\View\\Helper\\Auth', $helper);
     $this->assertSame($auth, $helper->getService());
 }