function CascadingStylesheetsTestCase::testAddCssFileWithQueryString

7.x common.test CascadingStylesheetsTestCase::testAddCssFileWithQueryString()

Tests that the query string remains intact when adding CSS files that have query string parameters.

File

drupal-7.x/modules/simpletest/tests/common.test, line 833
Tests for common.inc functionality.

Class

CascadingStylesheetsTestCase
Test the Drupal CSS system.

Code

function testAddCssFileWithQueryString() {
  $this->drupalGet('common-test/query-string');
  $query_string = variable_get('css_js_query_string', '0');
  $this->assertRaw(drupal_get_path('module', 'node') . '/node.css?' . $query_string, 'Query string was appended correctly to css.');
  $this->assertRaw(drupal_get_path('module', 'node') . '/node-fake.css?arg1=value1&arg2=value2', 'Query string not escaped on a URI.');
}