You are here

protected function GlobalRedirectTest::initMink in Redirect 8

Initializes Mink sessions.

Overrides BrowserTestBase::initMink

File

tests/src/Functional/GlobalRedirectTest.php, line 82

Class

GlobalRedirectTest
Global redirect test cases.

Namespace

Drupal\Tests\redirect\Functional

Code

protected function initMink() {
  $session = parent::initMink();

  /** @var \Behat\Mink\Driver\GoutteDriver $driver */
  $driver = $session
    ->getDriver();

  // Since we are testing low-level redirect stuff, the HTTP client should
  // NOT automatically follow redirects sent by the server.
  $driver
    ->getClient()
    ->followRedirects(FALSE);
  return $session;
}