public function testRunActionWithParams() { $params = array('strict' => true, 'verbose' => true, 'debug' => true); $runner = $this->getMockForAbstractClass('HumusPHPUnitModule\\RunnerInterface'); $runner->expects($this->once())->method('setParams')->with($params); $runner->expects($this->once())->method('run'); $params = new Parameters(); $params->set('strict', true); $params->set('verbose', true); $params->set('debug', true); $this->request->setParams($params); $this->controller->setRunner($runner); $response = new Response(); $this->controller->dispatch($this->request, $response); }
public function testGenerateActionWithFilledConfigurationValidLocatorWithVerbose() { $this->markTestIncomplete(); $configuration = array('name_to_configuration_path' => array('valid_locator' => __FILE__)); $console = $this->console; $processPipe = $this->getMockOfProcessPipeInterface(); $processPipe->shouldReceive('execute')->once(); $console->shouldReceive('writeLine')->with('generating "valid_locator" by using configuration file "' . __FILE__ . '"')->once(); $this->controller->setConfiguration($configuration); $this->controller->setGenerateConfigurationProcessPipe($processPipe); $this->routeMatch->setParam('action', 'generate'); $this->request->setParams($this->getParameters(array('locator_name' => 'valid_locator', 'verbose' => true))); $this->controller->dispatch($this->request); }
private function setRequestParams(array $params = []) { $this->request->setParams(new Parameters($params)); }