public function testDebugHaveEscaper() { Debug::setSapi('apache'); $escaper = new Escaper(); Debug::setEscaper($escaper); $a = array("a" => "<script type=\"text/javascript\""); $result = Debug::dump($a, "LABEL", false); $this->assertContains("<script type="text/javascript""", $result); }
/** * @group ZF-4136 * @group ZF-1663 */ public function testXdebugEnabledAndNonCliSapiDoesNotEscapeSpecialChars() { if (!extension_loaded('xdebug')) { $this->markTestSkipped("This test only works in combination with xdebug."); } Debug::setSapi('apache'); $a = array("a" => "b"); $result = Debug::dump($a, "LABEL", false); $this->assertContains("<pre>", $result); $this->assertContains("</pre>", $result); }