From 5392133beb62b994e4b34b10067e0f5021f0cd9a Mon Sep 17 00:00:00 2001
From: Aigars Gedroics <gedrox@gmail.com>
Date: Tue, 17 Apr 2012 10:57:31 +0300
Subject: [PATCH] [DDC-1757] test checks DQL only now, doesn't create schema
 anymore

---
 .../ORM/Functional/Ticket/DDC1757Test.php     | 30 +++----------------
 1 file changed, 4 insertions(+), 26 deletions(-)

diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1757Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1757Test.php
index 49a573390..77f32907e 100644
--- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1757Test.php
+++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1757Test.php
@@ -8,20 +8,6 @@ require_once __DIR__ . '/../../../TestInit.php';
 
 class DDC1757Test extends \Doctrine\Tests\OrmFunctionalTestCase
 {
-    protected function setUp()
-    {
-        parent::setUp();
-
-        try {
-            $this->_schemaTool->createSchema(array(
-                $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1757A'),
-                $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1757B'),
-                $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1757C'),
-                $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1757D'),
-            ));
-        } catch(\Exception $ignored) {}
-    }
-
     public function testFailingCase()
     {
 		$qb = $this->_em->createQueryBuilder();
@@ -36,18 +22,10 @@ class DDC1757Test extends \Doctrine\Tests\OrmFunctionalTestCase
         $q = $qb->getQuery();
         $dql = $q->getDQL();
 
-        try {
-            $data = $q->getResult();
-
-            self::assertEmpty($data);
-        } catch (\Doctrine\ORM\Query\QueryException $queryException) {
-            // Show difference between expected and actual queries on error
-            self::assertEquals("SELECT _a FROM " . __NAMESPACE__ . "\DDC1757A _a, " . __NAMESPACE__ . "\DDC1757B _b INNER JOIN _b.c _c INNER JOIN _c.d _d",
-                    $dql,
-                    "Wrong DQL query: " . $queryException->getMessage());
-
-            throw new \RuntimeException("Unexpected issue. DQL is correct but the query is failing.");
-        }
+        // Show difference between expected and actual queries on error
+        self::assertEquals("SELECT _a FROM " . __NAMESPACE__ . "\DDC1757A _a, " . __NAMESPACE__ . "\DDC1757B _b INNER JOIN _b.c _c INNER JOIN _c.d _d",
+                $dql,
+                "Wrong DQL query");
     }
 }