1 common.test | CommonJavaScriptTestCase::testAddSetting() |
Test adding settings.
File
- core/
modules/ simpletest/ tests/ common.test, line 1404 - Tests for common.inc functionality.
Class
- CommonJavaScriptTestCase
- Tests for the JavaScript system.
Code
function testAddSetting() {
$javascript = backdrop_add_js(array('backdrop' => 'rocks', 'v1.0.0' => 1421394600), 'setting');
$this->assertEqual(1421394600, $javascript['settings']['data'][2]['v1.0.0'], 'JavaScript setting is set correctly.');
$this->assertEqual('rocks', $javascript['settings']['data'][2]['backdrop'], 'The other JavaScript setting is set correctly.');
}