protected function setUp() { $this->serviceManager = Bootstrap::getServiceManager(); $this->fileSystem = vfsStream::setup('public', null, array('img' => array('test.jpg' => file_get_contents(__DIR__ . '/../../_files/test.jpg')), 'processed' => array())); $this->imagine = $this->serviceManager->get('TckImageResizerImagine'); $this->imageProcessing = new ImageProcessing($this->imagine); }
protected function setUp() { $serviceManager = Bootstrap::getServiceManager(); $this->fileSystem = vfsStream::setup('public', null, array('img' => array('test.jpg' => file_get_contents(__DIR__ . '/../../_files/test.jpg')), 'processed' => array())); $imageProcessing = $serviceManager->get('TckImageResizer\\Service\\ImageProcessing'); $this->controller = new IndexController($imageProcessing, vfsStream::url('public')); $this->request = new Request(); $this->routeMatch = new RouteMatch(array('controller' => 'index')); $this->event = new MvcEvent(); $config = $serviceManager->get('Config'); $routerConfig = isset($config['router']) ? $config['router'] : array(); $router = HttpRouter::factory($routerConfig); $this->event->setRouter($router); $this->event->setRouteMatch($this->routeMatch); $this->controller->setEvent($this->event); $this->controller->setServiceLocator($serviceManager); }
protected function setUp() { $this->controllerManager = Bootstrap::getServiceManager()->get('ControllerLoader'); $this->controllerFactory = new IndexControllerFactory(); }
protected function setUp() { $this->serviceManager = Bootstrap::getServiceManager(); $this->imageProcessingFactory = new ImageProcessingFactory(); }