$connection = Database::
getConnection();
$log_count =
$connection->
select('watchdog'
)->
countQuery()->
execute()->
fetchField();
// By not calling performMetaRefresh() here, we simulate JavaScript being
// enabled, because as far as the BigPipe module is concerned, JavaScript is
// enabled in the browser as long as the BigPipe no-JS cookie is *not* set.
// @see setUp()
// @see performMetaRefresh()
$this->
drupalGet(Url::
fromRoute('big_pipe_test'
));
$this->
assertBigPipeResponseHeadersPresent();
$this->
assertSession()->
responseHeaderNotContains('X-Drupal-Cache-Tags', 'cache_tag_set_in_lazy_builder'
);
$this->
setCsrfTokenSeedInTestEnvironment();
$cases =
$this->
getTestCases();
$this->
assertBigPipeNoJsPlaceholders([ $cases['edge_case__invalid_html'
]->bigPipeNoJsPlaceholder =>
$cases['edge_case__invalid_html'
]->embeddedHtmlResponse,
$cases['html_attribute_value'
]->bigPipeNoJsPlaceholder =>
$cases['html_attribute_value'
]->embeddedHtmlResponse,
$cases['html_attribute_value_subset'
]->bigPipeNoJsPlaceholder =>
$cases['html_attribute_value_subset'
]->embeddedHtmlResponse,
]);
$this->
assertBigPipePlaceholders([ $cases['html'
]->bigPipePlaceholderId => Json::
encode($cases['html'
]->embeddedAjaxResponseCommands
),