Пример #1
0
 /**
  * Test [code] tag
  *
  * @param string $string
  * @param string $expected
  * @dataProvider providerCode
  */
 public function testCode($string, $expected)
 {
     $result = $this->parser->parse($string);
     $result = html_entity_decode($result, ENT_COMPAT, 'UTF-8');
     $this->assertEquals($expected, $result, 'Result of [code] test did not pass.');
 }
 /**
  * Prevent malicious html
  *
  * @param string $string
  * @param string $expected
  * @dataProvider providerStripMaliciousHtml
  */
 public function testStripMaliciousHtml($string, $expected = '')
 {
     $result = $this->parser->parse($string);
     $result = html_entity_decode($result, ENT_COMPAT, 'UTF-8');
     $this->assertEquals($expected, $result);
 }