diff --git a/core/modules/system/src/Tests/Render/AjaxPageStateTest.php b/core/modules/system/src/Tests/Render/AjaxPageStateTest.php index 08cd276..8b0aff7 100644 --- a/core/modules/system/src/Tests/Render/AjaxPageStateTest.php +++ b/core/modules/system/src/Tests/Render/AjaxPageStateTest.php @@ -12,6 +12,13 @@ class AjaxPageStateTest extends WebTestBase { /** + * Modules to install. + * + * @var array + */ + public static $modules = ['node', 'views']; + + /** * User account with all available permissions * * @var \Drupal\Core\Session\AccountInterface @@ -77,22 +84,16 @@ public function testHtml5ShivIsNotLoaded() { } /** - * Test if multiple libaries can be excluded. + * Test if multiple libraries can be excluded. * - * ajax_page_state[libraries] should be able to support multiple libraries + * The ajax_page_state[libraries] should be able to support multiple libraries * comma separated. */ public function testMultipleLibrariesAreNotLoaded() { $this->drupalGet('node', - array( - "query" => - array( - 'ajax_page_state' => array( - 'libraries' => 'core/html5shiv,core/drupalSettings' - ) - ) - ) + ['query' => ['ajax_page_state' => ['libraries' => 'core/html5shiv,core/drupalSettings']]] ); + $this->assertResponse(200); $this->assertNoRaw( '/core/assets/vendor/html5shiv/html5shiv.min.js', 'The html5shiv library from core should be excluded from loading.' @@ -102,6 +103,17 @@ public function testMultipleLibrariesAreNotLoaded() { '/core/misc/drupalSettingsLoader.js', 'The drupalSettings library from core should be excluded from loading.' ); + + $this->drupalGet('node'); + $this->assertRaw( + '/core/assets/vendor/html5shiv/html5shiv.min.js', + 'The html5shiv library from core should be includes in loading.' + ); + + $this->assertRaw( + '/core/misc/drupalSettingsLoader.js', + 'The drupalSettings library from core should be includes in loading.' + ); } }