[DDC-1757] test checks DQL only now, doesn't create schema anymore
This commit is contained in:
parent
aa381951cd
commit
59e598acc5
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user