function ThemeHtmlTag::testThemeHtmlTag

7.x theme.test ThemeHtmlTag::testThemeHtmlTag()

Test function theme_html_tag()

File

drupal-7.x/modules/simpletest/tests/theme.test, line 442
Tests for the theme API.

Class

ThemeHtmlTag
Unit tests for theme_html_tag().

Code

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), '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), 'Test title tag generation.');
}