示例#1
0
 /**
  * Tests the escaper
  *
  * @author Nikos Dimopoulos <*****@*****.**>
  * @since  2012-11-30
  */
 public function testEscapeHtml()
 {
     $escaper = new PhEscaper();
     $source = "<h1></h1>";
     $expected = '&lt;h1&gt;&lt;/h1&gt;';
     $actual = $escaper->escapeHtml($source);
     $this->assertEquals($expected, $actual, 'The escaper does not escape string correctly');
 }
示例#2
0
 public function escapeHtml($text)
 {
     return parent::escapeHtml($text);
 }