Commit 62233759 by Alexander Makarov

Merge pull request #94 from rinatio/fix-var-dump-for-objects

Fixed VarDumper::dump for objects
parents a948e738 1a317ebe
...@@ -116,7 +116,7 @@ class VarDumper ...@@ -116,7 +116,7 @@ class VarDumper
} elseif (self::$_depth <= $level) { } elseif (self::$_depth <= $level) {
self::$_output .= get_class($var) . '(...)'; self::$_output .= get_class($var) . '(...)';
} else { } else {
$id = self::$_objects[] = $var; $id = array_push(self::$_objects, $var);
$className = get_class($var); $className = get_class($var);
$members = (array)$var; $members = (array)$var;
$spaces = str_repeat(' ', $level * 4); $spaces = str_repeat(' ', $level * 4);
......
<?php
namespace yiiunit\framework\helpers;
use \yii\helpers\VarDumper;
class VarDumperTest extends \yii\test\TestCase
{
public function testDumpObject()
{
$obj = new \StdClass();
VarDumper::dump($obj);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment