diff --git a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php index a4983fded980..92efb10376d0 100644 --- a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php +++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php @@ -186,7 +186,7 @@ class BigPipeTest extends BrowserTestBase { $this->assertRaw('', 'Closing body tag present.'); - $this->pass('Verifying BigPipe assets are present…', 'Debug'); + // Verifying BigPipe assets are present. $this->assertFalse(empty($this->getDrupalSettings()), 'drupalSettings present.'); $this->assertContains('big_pipe/big_pipe', explode(',', $this->getDrupalSettings()['ajaxPageState']['libraries']), 'BigPipe asset library is present.'); @@ -205,7 +205,8 @@ class BigPipeTest extends BrowserTestBase { $this->drupalGet(Url::fromUri('base:non-existing-path')); // Simulate development. - $this->pass('Verifying BigPipe provides useful error output when an error occurs while rendering a placeholder if verbose error logging is enabled.', 'Debug'); + // Verifying BigPipe provides useful error output when an error occurs + // while rendering a placeholder if verbose error logging is enabled. $this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_VERBOSE)->save(); $this->drupalGet(Url::fromRoute('big_pipe_test')); // The 'edge_case__html_exception' case throws an exception. @@ -259,13 +260,13 @@ class BigPipeTest extends BrowserTestBase { $cases['exception__embedded_response']->bigPipePlaceholderId => NULL, ]); - $this->pass('Verifying there are no BigPipe placeholders & replacements…', 'Debug'); + // Verifying there are no BigPipe placeholders & replacements. $this->assertEqual('', $this->drupalGetHeader('BigPipe-Test-Placeholders')); - $this->pass('Verifying BigPipe start/stop signals are absent…', 'Debug'); + // Verifying BigPipe start/stop signals are absent. $this->assertNoRaw(BigPipe::START_SIGNAL, 'BigPipe start signal absent.'); $this->assertNoRaw(BigPipe::STOP_SIGNAL, 'BigPipe stop signal absent.'); - $this->pass('Verifying BigPipe assets are absent…', 'Debug'); + // Verifying BigPipe assets are absent. $this->assertTrue(!isset($this->getDrupalSettings()['bigPipePlaceholderIds']) && empty($this->getDrupalSettings()['ajaxPageState']), 'BigPipe drupalSettings and BigPipe asset library absent.'); $this->assertRaw('', 'Closing body tag present.'); @@ -274,7 +275,8 @@ class BigPipeTest extends BrowserTestBase { $this->drupalGet(Url::fromUri('base:non-existing-path')); // Simulate development. - $this->pass('Verifying BigPipe provides useful error output when an error occurs while rendering a placeholder if verbose error logging is enabled.', 'Debug'); + // Verifying BigPipe provides useful error output when an error occurs + // while rendering a placeholder if verbose error logging is enabled. $this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_VERBOSE)->save(); $this->drupalGet(Url::fromRoute('big_pipe_test')); // The 'edge_case__html_exception' case throws an exception. @@ -322,7 +324,6 @@ class BigPipeTest extends BrowserTestBase { } protected function assertBigPipeResponseHeadersPresent() { - $this->pass('Verifying BigPipe response headers…', 'Debug'); // Check that Cache-Control header set to "private". $this->assertSession()->responseHeaderContains('Cache-Control', 'private'); $this->assertEqual('no-store, content="BigPipe/1.0"', $this->drupalGetHeader('Surrogate-Control')); @@ -337,10 +338,10 @@ class BigPipeTest extends BrowserTestBase { * markup. */ protected function assertBigPipeNoJsPlaceholders(array $expected_big_pipe_nojs_placeholders) { - $this->pass('Verifying BigPipe no-JS placeholders & replacements…', 'Debug'); $this->assertSetsEqual(array_keys($expected_big_pipe_nojs_placeholders), array_map('rawurldecode', explode(' ', $this->drupalGetHeader('BigPipe-Test-No-Js-Placeholders')))); foreach ($expected_big_pipe_nojs_placeholders as $big_pipe_nojs_placeholder => $expected_replacement) { - $this->pass('Checking whether the replacement for the BigPipe no-JS placeholder "' . $big_pipe_nojs_placeholder . '" is present:'); + // Checking whether the replacement for the BigPipe no-JS placeholder + // $big_pipe_nojs_placeholder is present. $this->assertNoRaw($big_pipe_nojs_placeholder); if ($expected_replacement !== NULL) { $this->assertRaw($expected_replacement); @@ -358,12 +359,10 @@ class BigPipeTest extends BrowserTestBase { * defined in the order that they are expected to be rendered & streamed. */ protected function assertBigPipePlaceholders(array $expected_big_pipe_placeholders, array $expected_big_pipe_placeholder_stream_order) { - $this->pass('Verifying BigPipe placeholders & replacements…', 'Debug'); $this->assertSetsEqual(array_keys($expected_big_pipe_placeholders), explode(' ', $this->drupalGetHeader('BigPipe-Test-Placeholders'))); $placeholder_positions = []; $placeholder_replacement_positions = []; foreach ($expected_big_pipe_placeholders as $big_pipe_placeholder_id => $expected_ajax_response) { - $this->pass('BigPipe placeholder: ' . $big_pipe_placeholder_id, 'Debug'); // Verify expected placeholder. $expected_placeholder_html = ''; $this->assertRaw($expected_placeholder_html, 'BigPipe placeholder for placeholder ID "' . $big_pipe_placeholder_id . '" found.'); @@ -396,14 +395,15 @@ class BigPipeTest extends BrowserTestBase { $this->assertSetsEqual(array_keys($expected_big_pipe_placeholders_with_replacements), array_values($placeholder_replacement_positions)); $this->assertSame(count($expected_big_pipe_placeholders_with_replacements), preg_match_all('/' . preg_quote('