the whole shebang

This commit is contained in:
2014-11-25 16:42:40 +01:00
parent 7f74c0613e
commit ab1334c0cf
3686 changed files with 496409 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace Doctrine\Tests\Common\Util;
use Doctrine\Tests\DoctrineTestCase;
use Doctrine\Common\Util\Debug;
class DebugTest extends DoctrineTestCase
{
public function testExportObject( )
{
$obj = new \stdClass;
$obj->foo = "bar";
$obj->bar = 1234;
$var = Debug::export($obj, 2);
$this->assertEquals( "stdClass", $var->__CLASS__ );
}
public function testExportDateTime()
{
$obj = new \DateTime( "2010-10-10 10:10:10" );
$var = Debug::export( $obj, 2 );
$this->assertEquals( "DateTime", $var->__CLASS__ );
}
public function testExportArrayTraversable()
{
$obj = new \ArrayObject(array('foobar'));
$var = Debug::export($obj, 2);
$this->assertContains('foobar', $var->__STORAGE__);
$it = new \ArrayIterator(array('foobar'));
$var = Debug::export($it, 5);
$this->assertContains('foobar', $var->__STORAGE__);
}
}