function BigPipeTest::setUp

Same name in other branches
  1. 8.9.x core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::setUp()
  2. 10 core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::setUp()
  3. 11.x core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/big_pipe/tests/src/Functional/BigPipeTest.php, line 45

Class

BigPipeTest
Tests BigPipe's no-JS detection & response delivery (with and without JS).

Namespace

Drupal\Tests\big_pipe\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Ignore the <meta> refresh that big_pipe.module sets. It causes a redirect
    // to a page that sets another cookie, which causes BrowserTestBase to lose
    // the session cookie. To avoid this problem, tests should first call
    // drupalGet() and then call checkForMetaRefresh() manually, and then reset
    // $this->maximumMetaRefreshCount and $this->metaRefreshCount.
    // @see doMetaRefresh()
    $this->maximumMetaRefreshCount = 0;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.