3
namespace Doctrine\Tests\Common\Util;
5
use Doctrine\Tests\DoctrineTestCase;
6
use Doctrine\Common\Util\Debug;
8
class DebugTest extends DoctrineTestCase
10
public function testExportObject( )
16
$var = Debug::export($obj, 2);
17
$this->assertEquals( "stdClass", $var->__CLASS__ );
20
public function testExportDateTime()
22
$obj = new \DateTime( "2010-10-10 10:10:10" );
24
$var = Debug::export( $obj, 2 );
25
$this->assertEquals( "DateTime", $var->__CLASS__ );
28
public function testExportArrayTraversable()
30
$obj = new \ArrayObject(array('foobar'));
32
$var = Debug::export($obj, 2);
33
$this->assertContains('foobar', $var->__STORAGE__);
35
$it = new \ArrayIterator(array('foobar'));
37
$var = Debug::export($it, 5);
38
$this->assertContains('foobar', $var->__STORAGE__);