Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / ORM / Functional / Ticket / DDC1050Test.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1050Test.php b/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1050Test.php
new file mode 100644 (file)
index 0000000..31c0733
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+namespace Doctrine\Tests\ORM\Functional\Ticket;
+
+use Doctrine\Common\Collections\ArrayCollection;
+require_once __DIR__ . '/../../../TestInit.php';
+
+/**
+ * @group DDC-1050
+ */
+class DDC1050Test extends \Doctrine\Tests\OrmFunctionalTestCase
+{
+    public function setUp()
+    {
+        $this->markTestSkipped('performance skipped');
+        $this->useModelSet('cms');
+        parent::setUp();
+    }
+
+    public function testPerformance()
+    {
+        for ($i = 2; $i < 10000; ++$i) {
+            $user = new \Doctrine\Tests\Models\CMS\CmsUser();
+            $user->status = 'developer';
+            $user->username = 'jwage'+$i;
+            $user->name = 'Jonathan';
+            $this->_em->persist($user);
+        }
+        $this->_em->flush();
+        $this->_em->clear();
+
+        $s = microtime(true);
+        $users = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser')->findAll();
+        $e = microtime(true);
+        echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL;
+    }
+}
\ No newline at end of file