protected function setUp() { parent::setUp(); ServiceLocatorFactory::setInstance($this->getServiceManager()); $this->controller = new IndexController(); $this->controller->setServiceLocator(ServiceLocatorFactory::getInstance()); $this->controller->setEvent($this->event); $this->controller->setServiceLocator($this->serviceManager); }
/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $this->IndexController = new IndexController(); $this->request = new Request(); $this->response = null; $this->routeMatch = new RouteMatch(array('controller' => 'controller-sample')); $this->event = new MvcEvent(); $this->event->setRouteMatch($this->routeMatch); $this->IndexController->setEvent($this->event); }