function CascadingStylesheetsTestCase::testAddExternal

Tests adding an external stylesheet.

File

modules/simpletest/tests/common.test, line 803

Class

CascadingStylesheetsTestCase
Test the Drupal CSS system.

Code

function testAddExternal() {
    $path = 'http://example.com/style.css';
    $css = drupal_add_css($path, 'external');
    $this->assertEqual($css[$path]['type'], 'external', 'Adding an external CSS file caches it properly.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.