示例#1
0
 /**
  * {@inheritdoc}
  */
 public function getOptions(RouteMatchInterface $route_match)
 {
     $options = parent::getOptions($route_match);
     // Append the current path as destination to the query string.
     $options['query']['destination'] = $this->redirectDestination->get();
     return $options;
 }
 /**
  * @covers ::set
  * @covers ::get
  */
 public function testSetAfterGetCall()
 {
     $request = Request::create('/');
     $request->query->set('destination', '/other-example');
     $this->requestStack->push($request);
     $this->setupUrlGenerator();
     $this->redirectDestination->set('/example');
     $this->assertEquals('/example', $this->redirectDestination->get());
 }