Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / ORM / Functional / Ticket / DDC1043Test.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1043Test.php b/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1043Test.php
new file mode 100644 (file)
index 0000000..31bd835
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+namespace Doctrine\Tests\ORM\Functional\Ticket;
+
+use Doctrine\Common\Collections\ArrayCollection;
+require_once __DIR__ . '/../../../TestInit.php';
+
+/**
+ * @group DDC-1043
+ */
+class DDC1043Test extends \Doctrine\Tests\OrmFunctionalTestCase
+{
+    public function setUp()
+    {
+        $this->useModelSet('cms');
+        parent::setUp();
+    }
+
+    public function testChangeSetPlusWeirdPHPCastingIntCastingRule()
+    {
+        $user = new \Doctrine\Tests\Models\CMS\CmsUser();
+        $user->name = "John Galt";
+        $user->username = "jgalt";
+        $user->status = "+44";
+
+        $this->_em->persist($user);
+        $this->_em->flush();
+
+        $user->status = "44";
+        $this->_em->flush();
+        $this->_em->clear();
+
+        $user = $this->_em->find("Doctrine\Tests\Models\CMS\CmsUser", $user->id);
+        $this->assertSame("44", $user->status);
+    }
+}
\ No newline at end of file