isHeaderRedirection() публичный Метод

public isHeaderRedirection ( ) : boolean
Результат boolean
Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function redirect(RequestConfiguration $configuration, $url, $status = 302)
 {
     if ($configuration->isHeaderRedirection()) {
         return new Response('', 200, ['X-SYLIUS-LOCATION' => $url . $configuration->getRedirectHash()]);
     }
     return new RedirectResponse($url . $configuration->getRedirectHash(), $status);
 }
Пример #2
0
 function it_redirects_with_header(RequestConfiguration $configuration)
 {
     $configuration->getRedirectHash()->willReturn(null);
     $configuration->isHeaderRedirection()->willReturn(true);
     $this->redirect($configuration, 'http://myurl.com')->shouldHaveType(Response::class);
 }