コード例 #1
0
 /**
  * @return RedirectResponse
  */
 public function redirectToIndex()
 {
     return $this->redirectToRoute($this->config->getRedirectRoute('index'), $this->config->getRedirectParameters());
 }
コード例 #2
0
 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'));
 }