refresh that big_pipe.module sets. It causes a redirect
// to a page that sets another cookie, which causes WebTestBase 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;
}
/**
* Performs a single refresh explicitly.
*
* This test disables the automatic refresh checking, each time it is
* desired that this runs, a test case must explicitly call this.
*
* @see setUp()
*/
protected function performMetaRefresh() {
$this->maximumMetaRefreshCount = 1;
$this->checkForMetaRefresh();
$this->maximumMetaRefreshCount = 0;
$this->metaRefreshCount = 0;
}
/**
* Tests BigPipe's no-JS detection.
*
* Covers:
* - big_pipe_page_attachments()
* - \Drupal\big_pipe\Controller\BigPipeController
*/
public function testNoJsDetection() {
$no_js_to_js_markup = '';
// 1. No session (anonymous).
$this->drupalGet(Url::fromRoute(''));
$this->assertSessionCookieExists(FALSE);
$this->assertBigPipeNoJsCookieExists(FALSE);
$this->assertNoRaw('');
$this->assertNoRaw($no_js_to_js_markup);
$this->assertBigPipeNoJsMetaRefreshRedirect();
$this->assertBigPipeNoJsCookieExists(TRUE);
$this->assertNoRaw('');
$this->assertNoRaw($no_js_to_js_markup);
$this->assertBigPipeNoJsMetaRefreshRedirect();
$this->assertBigPipeNoJsCookieExists(TRUE);
$this->assertNoRaw('