Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / ORM / Functional / Ticket / DDC588Test.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC588Test.php b/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC588Test.php
new file mode 100644 (file)
index 0000000..3f899d7
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+namespace Doctrine\Tests\ORM\Functional\Ticket;
+
+require_once __DIR__ . '/../../../TestInit.php';
+
+class DDC588Test extends \Doctrine\Tests\OrmFunctionalTestCase
+{
+    protected function setUp()
+    {
+        parent::setUp();
+        $this->_schemaTool->createSchema(array(
+            $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC588Site'),
+        ));
+    }
+
+    public function testIssue()
+    {
+        $site = new DDC588Site('Foo');
+
+        $this->_em->persist($site);
+        $this->_em->flush();
+        // Following should not result in exception
+        $this->_em->refresh($site);
+    }
+}
+
+/**
+ * @Entity
+ */
+class DDC588Site
+{
+    /**
+     * @Id
+     * @Column(type="integer", name="site_id")
+     * @GeneratedValue
+     */
+    public $id;
+
+    /**
+     * @Column(type="string", length=45)
+     */
+    protected $name = null;
+
+    public function __construct($name = '')
+    {
+        $this->name = $name;
+    }
+}