1 theme.test ThemeHeadTag::testThemeHeadTag()

Test function theme_head_tag()

File

core/modules/simpletest/tests/theme.test, line 577
Tests for the theme API.

Class

ThemeHeadTag
Unit tests for meta tags.

Code

function testThemeHeadTag() {
  // Test auto-closure meta tag generation
  $tag['element'] = array('#tag' => 'meta', '#attributes' => array('name' => 'description', 'content' => 'Backdrop test'));
  $this->assertEqual('<meta name="description" content="Backdrop test" />' . "\n", theme_head_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_head_tag($tag), 'Test title tag generation.');
}