diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-09-17 14:10:53 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-09-17 14:10:53 -0400 |
commit | 89c036717f583242bef91c90171627fe3c3de1bc (patch) | |
tree | aa26530232c070969bd540df448f596e614de8a6 /modules | |
parent | a9ad3ea15a528be270a3a2a15e019c8ae0bb81d4 (diff) | |
download | brdo-89c036717f583242bef91c90171627fe3c3de1bc.tar.gz brdo-89c036717f583242bef91c90171627fe3c3de1bc.tar.bz2 |
- Patch #952772 by oriol_e9g, mdupont, bleen18, idflood: theme_html_tag() optional value not really optional.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/tests/theme.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index f1e1bd58b..53557e361 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -354,3 +354,29 @@ class ThemeFastTestCase extends DrupalWebTestCase { $this->assertText('registry not initialized', t('The registry was not initialized')); } } + +/** + * Unit tests for theme_html_tag(). + */ +class ThemeHtmlTag extends DrupalUnitTestCase { + public static function getInfo() { + return array( + 'name' => 'Theme HTML Tag', + 'description' => 'Tests theme_html_tag() built-in theme functions.', + 'group' => 'Theme', + ); + } + + /** + * Test function theme_html_tag() + */ + function testThemeHtmlTag() { + // Test auto-closure meta tag generation + $tag['element'] = array('#tag' => 'meta', '#attributes' => array('name' => 'description', 'content' => 'Drupal test')); + $this->assertEqual('<meta name="description" content="Drupal test" />'."\n", theme_html_tag($tag), t('Test auto-closure meta tag generation.')); + + // Test title tag generation + $tag['element'] = array('#tag' => 'title', '#value' => 'title test'); + $this->assertEqual('<title>title test</title>'."\n", theme_html_tag($tag), t('Test title tag generation.')); + } +} |