assertBigPipeNoJsMetaRefreshRedirect example

$this->assertSessionCookieExists(FALSE);
    $this->assertBigPipeNoJsCookieExists(FALSE);
    $this->assertSession()->responseNotContains('<noscript><meta http-equiv="Refresh" content="0; URL=');
    $this->assertSession()->responseNotContains($no_js_to_js_markup);

    // 2. Session (authenticated).     $this->drupalLogin($this->rootUser);
    $this->assertSessionCookieExists(TRUE);
    $this->assertBigPipeNoJsCookieExists(FALSE);
    $this->assertSession()->responseContains('<noscript><meta http-equiv="Refresh" content="0; URL=' . base_path() . 'big_pipe/no-js?destination=' . UrlHelper::encodePath(base_path() . 'user/1?check_logged_in=1') . '" />' . "\n" . '</noscript>');
    $this->assertSession()->responseNotContains($no_js_to_js_markup);
    $this->assertBigPipeNoJsMetaRefreshRedirect();
    $this->assertBigPipeNoJsCookieExists(TRUE);
    $this->assertSession()->responseNotContains('<noscript><meta http-equiv="Refresh" content="0; URL=');
    $this->assertSession()->responseContains($no_js_to_js_markup);
    $this->drupalLogout();

    // Close the prior connection and remove the collected state.     $this->getSession()->reset();

    // 3. Session (anonymous).     $this->drupalGet(Url::fromRoute('user.login', []['query' => ['trigger_session' => 1]]));
    $this->drupalGet(Url::fromRoute('user.login'));
    
Home | Imprint | This part of the site doesn't use cookies.