diff options
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/bootstrap.test | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/simpletest/tests/bootstrap.test b/modules/simpletest/tests/bootstrap.test index 149c5ef49..3cacf1175 100644 --- a/modules/simpletest/tests/bootstrap.test +++ b/modules/simpletest/tests/bootstrap.test @@ -151,7 +151,7 @@ class BootstrapVariableTestCase extends DrupalWebTestCase { // Setting and retrieving values. $variable = $this->randomName(); variable_set('simpletest_bootstrap_variable_test', $variable); - $this->assertIdentical($variable, variable_get('simpletest_bootstrap_variable_test', NULL), t('Setting and retrieving values')); + $this->assertIdentical($variable, variable_get('simpletest_bootstrap_variable_test'), t('Setting and retrieving values')); // Make sure the variable persists across multiple requests. $this->drupalGet('system-test/variable-get'); @@ -164,6 +164,17 @@ class BootstrapVariableTestCase extends DrupalWebTestCase { $this->assertIdentical($variable, $default_value, t('Deleting variables')); } + /** + * Makes sure that the default variable parameter is passed through okay. + */ + function testVariableDefaults() { + // Tests passing nothing through to the default. + $this->assertIdentical(NULL, variable_get('simpletest_bootstrap_variable_test'), t('Variables are correctly defaulting to NULL.')); + + // Tests passing 5 to the default parameter. + $this->assertIdentical(5, variable_get('simpletest_bootstrap_variable_test', 5), t('The default variable parameter is passed through correctly.')); + } + } /** |