/** * @return RedirectResponse */ public function redirectToIndex() { return $this->redirectToRoute($this->config->getRedirectRoute('index'), $this->config->getRedirectParameters()); }
public function testConfigurationYieldsExpectedRedirectParametersWhenArray() { $expected = array('array'); $this->paramHandler = Mockery::mock('DAG\\Bundle\\ResourceBundle\\Controller\\ParametersParser')->shouldReceive('process')->once()->andReturn($expected)->getMock(); $config = new Configuration($this->paramHandler, 'prefix', 'resource', 'namespace'); $config->setParameters(array('redirect' => array('parameters' => $expected))); $this->assertSame($expected, $config->getRedirectParameters('resource')); }