summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-31 16:50:57 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-31 16:50:57 +0000
commit2c381622a5bd3ab5b22077348a088bb54ca202dc (patch)
treee11c0ecbdb81b067acbeb7b6fa16cd34e8147f1a /modules/simpletest/tests
parent9544110e01816cd78e73a6756f856d2d8b07bbd1 (diff)
downloadbrdo-2c381622a5bd3ab5b22077348a088bb54ca202dc.tar.gz
brdo-2c381622a5bd3ab5b22077348a088bb54ca202dc.tar.bz2
#88264 by Rob Loach and kscheirer: Make variable_get()'s defaultparameter default to NULL so that NULLs do not need to be specified.
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/bootstrap.test13
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.'));
+ }
+
}
/**