You are here

class SecuredRedirectStub in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php \Drupal\Tests\Component\HttpFoundation\SecuredRedirectStub
  2. 10 core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php \Drupal\Tests\Component\HttpFoundation\SecuredRedirectStub

Hierarchy

Expanded class hierarchy of SecuredRedirectStub

File

core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php, line 53
Contains \Drupal\Tests\Component\HttpFoundation\SecuredRedirectResponseTest.

Namespace

Drupal\Tests\Component\HttpFoundation
View source
class SecuredRedirectStub extends SecuredRedirectResponse {

  /**
   * {@inheritdoc}
   */
  protected function isSafe($url) {

    // Empty implementation for testing.
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SecuredRedirectResponse::createFromRedirectResponse public static function Copies an existing redirect response into a safe one.
SecuredRedirectResponse::fromResponse protected function Copies over the values from the given response. 1
SecuredRedirectResponse::setTargetUrl public function Sets the redirect target of this response.
SecuredRedirectStub::isSafe protected function Returns whether the URL is considered as safe to redirect to. Overrides SecuredRedirectResponse::isSafe