Permalink
Browse files

Added case for `unknown` type. Fixes #3966

  • Loading branch information...
1 parent c01aacf commit 2150e8dce51c485808dafe67b9a415d4e9131ef6 @tigrang tigrang committed Aug 6, 2013
Showing with 7 additions and 0 deletions.
  1. +5 −0 lib/Cake/Test/Case/Utility/DebuggerTest.php
  2. +2 −0 lib/Cake/Utility/Debugger.php
@@ -408,6 +408,11 @@ public function testExportVar() {
false
TEXT;
$this->assertTextEquals($expected, $result);
+
+ $file = fopen('php://output', 'w');
+ fclose($file);
+ $result = Debugger::exportVar($file);
+ $this->assertTextEquals('unknown', $result);
}
/**
@@ -500,6 +500,8 @@ protected static function _export($var, $depth, $indent) {
return strtolower(gettype($var));
case 'null':
return 'null';
+ case 'unknown':
+ return 'unknown';
default:
return self::_object($var, $depth - 1, $indent + 1);
}

0 comments on commit 2150e8d

Please sign in to comment.