Ejemplo n.º 1
0
 public function test_format_text_email()
 {
     $this->assertSame("This is a TEST", format_text_email('<p>This is a <strong>test</strong></p>', FORMAT_HTML));
     $this->assertSame("This is a TEST", format_text_email('<p class="frogs">This is a <strong class=\'fishes\'>test</strong></p>', FORMAT_HTML));
     $this->assertSame('& so is this', format_text_email('&amp; so is this', FORMAT_HTML));
     $this->assertSame('Two bullets: ' . core_text::code2utf8(8226) . ' *', format_text_email('Two bullets: &#x2022; &#8226;', FORMAT_HTML));
     $this->assertSame(core_text::code2utf8(0x7fd2) . core_text::code2utf8(0x7fd2), format_text_email('&#x7fd2;&#x7FD2;', FORMAT_HTML));
 }
Ejemplo n.º 2
0
 /**
  * Tests the static code2utf8 method.
  */
 public function test_code2utf8()
 {
     $this->assertSame('Ž', core_text::code2utf8(381));
 }