Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / common / tests / Doctrine / Tests / Common / Util / DebugTest.php
diff --git a/vendor/doctrine/common/tests/Doctrine/Tests/Common/Util/DebugTest.php b/vendor/doctrine/common/tests/Doctrine/Tests/Common/Util/DebugTest.php
new file mode 100644 (file)
index 0000000..b4e9eed
--- /dev/null
@@ -0,0 +1,27 @@
+<?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__ );
+    }
+}