From 20c8416607e4d88059d6af2b1aa706aec164a0ad Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Sun, 27 Dec 2009 19:02:07 +0000 Subject: [PATCH] [2.0] More coverage to AbstractSchemaName. --- tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php | 5 +++++ tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php b/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php index 3986a8309..dd29657cf 100644 --- a/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php +++ b/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php @@ -377,6 +377,11 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase $this->assertInvalidDql('select u, (select max(p.phonenumber) from Doctrine\Tests\Models\CMS\CmsPhonenumber p) maxId from Doctrine\Tests\Models\CMS\CmsUser u WHERE p.user = ?1'); } + public function testUnknownAbstractSchemaName() + { + $this->assertInvalidDql('SELECT u FROM UnknownClassName u'); + } + /** * This checks for invalid attempt to hydrate a proxy. It should throw an exception * diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index 369183914..2674382cf 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -23,10 +23,6 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase parent::assertEquals($sqlToBeConfirmed, $query->getSql()); $query->free(); } catch (Doctrine_Exception $e) { - if ($debug) { - echo $e->getTraceAsString() . PHP_EOL; - } - $this->fail($e->getMessage()); } }