public function AjaxPageStateTest::testHtml5ShivIsNotLoaded in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/src/Tests/Render/AjaxPageStateTest.php \Drupal\system\Tests\Render\AjaxPageStateTest::testHtml5ShivIsNotLoaded()
Give ajax_page_state[libraries]=core/html5shiv to exclude the library.
When called with ajax_page_state[libraries]=core/html5shiv the library should be excluded as it is already loaded. This should not affect other libraries so test if drupalSettings is still available.
File
- core/
modules/ system/ src/ Tests/ Render/ AjaxPageStateTest.php, line 63 - Contains \Drupal\system\Tests\Render\AjaxPageStateTest.
Class
- AjaxPageStateTest
- Performs tests for the effects of the ajax_page_state query parameter.
Namespace
Drupal\system\Tests\RenderCode
public function testHtml5ShivIsNotLoaded() {
$this
->drupalGet('node', array(
"query" => array(
'ajax_page_state' => array(
'libraries' => 'core/html5shiv',
),
),
));
$this
->assertNoRaw('/core/assets/vendor/html5shiv/html5shiv.min.js', 'The html5shiv library from core should be excluded from loading');
$this
->assertRaw('/core/misc/drupalSettingsLoader.js', 'The Dupalsettings library from core should be loaded.');
}