summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/bootstrap.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/bootstrap.test')
-rw-r--r--modules/simpletest/tests/bootstrap.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/simpletest/tests/bootstrap.test b/modules/simpletest/tests/bootstrap.test
index d8a9d8c1b..99bdca774 100644
--- a/modules/simpletest/tests/bootstrap.test
+++ b/modules/simpletest/tests/bootstrap.test
@@ -426,3 +426,28 @@ class BootstrapResettableStaticTestCase extends DrupalUnitTestCase {
$this->assertEqual($var, 'foo', t('Variable was reset after second invocation of global reset.'));
}
}
+
+/**
+ * Test miscellaneous functions in bootstrap.inc.
+ */
+class BootstrapMiscTestCase extends DrupalUnitTestCase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Miscellaneous bootstrap unit tests',
+ 'description' => 'Test miscellaneous functions in bootstrap.inc.',
+ 'group' => 'Bootstrap',
+ );
+ }
+
+ /**
+ * Test miscellaneous functions in bootstrap.inc.
+ */
+ function testMisc() {
+ // Test drupal_array_merge_deep().
+ $link_options_1 = array('fragment' => 'x', 'attributes' => array('title' => 'X', 'class' => array('a', 'b')), 'language' => 'en');
+ $link_options_2 = array('fragment' => 'y', 'attributes' => array('title' => 'Y', 'class' => array('c', 'd')), 'html' => TRUE);
+ $expected = array('fragment' => 'y', 'attributes' => array('title' => 'Y', 'class' => array('a', 'b', 'c', 'd')), 'language' => 'en', 'html' => TRUE);
+ $this->assertIdentical(drupal_array_merge_deep($link_options_1, $link_options_2), $expected, t('drupal_array_merge_deep() returned a properly merged array.'));
+ }
+}