function JavaScriptTest::testAddJsFileWithQueryString

Tests JavaScript files that have querystrings attached get added right.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php, line 560
Definition of Drupal\system\Tests\Common\JavaScriptTest.

Class

JavaScriptTest
Tests the JavaScript system.

Namespace

Drupal\system\Tests\Common

Code

function testAddJsFileWithQueryString() {
  $this
    ->drupalGet('common-test/query-string');
  $query_string = variable_get('css_js_query_string', '0');
  $this
    ->assertRaw(drupal_get_path('module', 'node') . '/node.js?' . $query_string, 'Query string was appended correctly to js.');
}