diff --git a/core/modules/system/src/Tests/Common/NoJavaScriptAnonymousTest.php b/core/modules/system/src/Tests/Common/NoJavaScriptAnonymousTest.php index e84d793..a3fcf9a 100644 --- a/core/modules/system/src/Tests/Common/NoJavaScriptAnonymousTest.php +++ b/core/modules/system/src/Tests/Common/NoJavaScriptAnonymousTest.php @@ -57,7 +57,8 @@ public function testNoJavaScript() { */ protected function assertNoJavaScriptExceptHtml5Shiv() { // Ensure drupalSettings is not set. - $this->assertNoRaw('var drupalSettings = {', 'drupalSettings is not set.'); + $settings = $this->getDrupalSettings(); + $this->assertTrue(empty($settings), 'drupalSettings is not set.'); // Ensure the HTML5 shiv exists. $this->assertRaw('html5shiv/html5shiv.min.js', 'HTML5 shiv JavaScript exists.');