Пример #1
0
 public function testCreateService()
 {
     $aclmock = $this->getMock('LearnZF2Acl\\Model\\Acl');
     $this->serviceLocator->expects($this->at(0))->method('get')->with('aclmodel')->willReturn($aclmock);
     $result = $this->factory->createService($this->controllerManager);
     $this->assertInstanceOf('LearnZF2Acl\\Controller\\AclController', $result);
 }
 public function testCreateService()
 {
     $aclmock = $this->prophesize('LearnZF2Acl\\Model\\Acl');
     $this->serviceLocator->get('aclmodel')->willReturn($aclmock);
     $result = $this->factory->createService($this->controllerManager->reveal());
     $this->assertInstanceOf('LearnZF2Acl\\Controller\\AclController', $result);
 }