public function testCreateService() { $sm = new ServiceManager(); $sm->setService('Console', new Posix()); $sm->setService('Config', []); $cm = $this->prophesize(ControllerManager::class); $cm->getServiceLocator()->willReturn($sm)->shouldBeCalled(); $controller = $this->factory->createService($cm->reveal()); $this->assertInstanceOf('Application\\Controller\\ConsoleController', $controller); }
public function testCreateService() { $sm = new ServiceManager(); $sm->setService('Console', new Posix()); $sm->setService('Config', []); $cm = new ControllerManager(); $cm->setServiceLocator($sm); $controller = $this->factory->createService($cm); $this->assertInstanceOf('Application\\Controller\\ConsoleController', $controller); }