1 common.test FeedIconTest::testFeedIconEscaping()

Check that special characters are correctly escaped. Test for issue #1211668.

File

core/modules/simpletest/tests/common.test, line 3520
Tests for common.inc functionality.

Class

FeedIconTest
Test for theme_feed_icon().

Code

function testFeedIconEscaping() {
  $variables = array();
  $variables['url'] = 'node';
  $variables['title'] = '<>&"\'';
  $text = theme_feed_icon($variables);
  preg_match('/title="(.*?)"/', $text, $matches);
  $this->assertEqual($matches[1], 'Subscribe to &amp;&quot;&#039;', 'theme_feed_icon() escapes reserved HTML characters.');
}