Пример #1
0
 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("&lt;script type=&quot;text/javascript&quot;&quot;", $result);
 }
Пример #2
0
 /**
  * @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);
 }