public function testDebugDumpLabel() { Zend_Debug::setSapi('cli'); $data = 'string'; $label = 'LABEL'; $result = Zend_Debug::Dump($data, $label, false); $result = str_replace(array(PHP_EOL, "\n"), '_', $result); $expected = "_{$label} _string(6) \"string\"__"; $this->assertEquals($expected, $result); }
/** * @group ZF-4136 * @group ZF-1663 */ public function testXdebugEnabledAndNonCliSapiDoesNotEscapeSpecialChars() { if (!extension_loaded('xdebug')) { $this->markTestSkipped("This test only works in combination with xdebug."); } Zend_Debug::setSapi('apache'); $a = array("a" => "b"); $result = Zend_Debug::dump($a, "LABEL", false); $this->assertContains("<pre>", $result); $this->assertContains("</pre>", $result); }