summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/common.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/common.test')
-rw-r--r--modules/simpletest/tests/common.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 13aad21e0..ad565b1ab 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -857,6 +857,20 @@ class JavaScriptTestCase extends DrupalWebTestCase {
$scripts = drupal_get_js();
$this->assertTrue(strpos($scripts, 'unknown') === FALSE, t('Unknown library was not added to the page.'));
}
+
+ /**
+ * Tests the addition of libraries through the #attached_library property.
+ */
+ function testAttachedLibrary() {
+ $element = array(
+ '#attached_library' => array(
+ array('system', 'farbtastic'),
+ )
+ );
+ drupal_render($element);
+ $scripts = drupal_get_js();
+ $this->assertTrue(strpos($scripts, 'misc/farbtastic/farbtastic.js'), t('The attached_library property adds the additional libraries.'));
+ }
}
/**