22 if (! function_exists(
'')) {
23 require_once (__DIR__ .
"/../../common-string.php");
29 const START_OFFSET = 15;
32 private $pagedTextResult;
34 protected function setUp()
39 public function testRenderContentTextEscapesForHtml()
41 $this->pagedTextResult->appendContentText(
"&");
43 assertThat($this->pagedTextResult->getText(), is(
"&"));
44 $this->addToAssertionCount(1);
47 public function testRenderContentTextConvertsToUtf8()
49 $this->pagedTextResult->appendContentText(
"äöü");
50 $expected = htmlspecialchars(
"äöü", ENT_SUBSTITUTE,
'UTF-8');
51 assertThat($this->pagedTextResult->getText(), is(equalTo($expected)));
52 $this->addToAssertionCount(1);