Making debug() not html escape in cli contexts.

This commit is contained in:
mark_story 2011-02-23 20:59:54 -05:00
parent 19bcec599b
commit 72245ebb0c
2 changed files with 3 additions and 3 deletions

View file

@ -98,7 +98,7 @@ TEXT;
if (php_sapi_name() == 'cli') {
$template = $text;
}
if ($showHtml === null) {
if ($showHtml === null && $template !== $text) {
$showHtml = true;
}
$var = print_r($var, true);

View file

@ -683,7 +683,7 @@ class BasicsTest extends CakeTestCase {
$this->assertPattern($pattern, $result);
ob_start();
debug('<div>this-is-a-test</div>');
debug('<div>this-is-a-test</div>', true);
$result = ob_get_clean();
$pattern = '/(.+?tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
@ -761,7 +761,7 @@ class BasicsTest extends CakeTestCase {
* @return void
*/
public function testStripslashesDeepSybase() {
$this->skipUnless(ini_get('magic_quotes_sybase') === '1', '%s magic_quotes_sybase is off');
$this->skipUnless(ini_get('magic_quotes_sybase') === '1', 'magic_quotes_sybase is off');
$this->assertEqual(stripslashes_deep("tes\'t"), "tes\'t");