You are here

public function AjaxPageStateTest::testLibrariesAvailable in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Render/AjaxPageStateTest.php \Drupal\system\Tests\Render\AjaxPageStateTest::testLibrariesAvailable()

Default functionality without the param ajax_page_state[libraries].

The libraries html5shiv and drupalSettings are loaded default from core and available in code as scripts. Do this as the base test.

File

core/modules/system/src/Tests/Render/AjaxPageStateTest.php, line 43
Contains \Drupal\system\Tests\Render\AjaxPageStateTest.

Class

AjaxPageStateTest
Performs tests for the effects of the ajax_page_state query parameter.

Namespace

Drupal\system\Tests\Render

Code

public function testLibrariesAvailable() {
  $this
    ->drupalGet('node', array());
  $this
    ->assertRaw('/core/assets/vendor/html5shiv/html5shiv.min.js', 'The html5shiv library from core should be loaded.');
  $this
    ->assertRaw('/core/misc/drupalSettingsLoader.js', 'The Dupalsettings library from core should be loaded.');
}