Commit dc649dbb authored by alexpott's avatar alexpott

Issue #2806733 by joelpittet: testMultipleLibrariesAreNotLoaded is not asserting anything

parent f9e4a5c9
......@@ -11,6 +11,13 @@
*/
class AjaxPageStateTest extends WebTestBase {
/**
* Modules to install.
*
* @var array
*/
public static $modules = ['node', 'views'];
/**
* User account with all available permissions
*
......@@ -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 included in loading.'
);
$this->assertRaw(
'/core/misc/drupalSettingsLoader.js',
'The drupalSettings library from core should be included in loading.'
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment