From 96a40f0098b25ab8ab76d5fdadc2cee05f6dfcd9 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Sat, 23 Aug 2008 16:42:23 +0000 Subject: [PATCH] Some tickets test cases --- tests/Orm/Query/SelectSqlGenerationTest.php | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/Orm/Query/SelectSqlGenerationTest.php b/tests/Orm/Query/SelectSqlGenerationTest.php index bdd4892ae..25bfad84b 100755 --- a/tests/Orm/Query/SelectSqlGenerationTest.php +++ b/tests/Orm/Query/SelectSqlGenerationTest.php @@ -141,6 +141,36 @@ class Orm_Query_SelectSqlGenerationTest extends Doctrine_OrmTestCase } + // Ticket #668 + public function testKeywordUsageInStringParam() + { + $this->assertSqlGeneration( + "SELECT u.name FROM CmsUser u WHERE u.name LIKE '%foo OR bar%'", + "SELECT cu.name AS cu__name FROM cms_user cu WHERE cu.name LIKE '%foo OR bar%'" + ); + } + + + // Ticket #973 + public function testSingleInValueWithoutSpace() + { + $this->assertSqlGeneration( + "SELECT u.name FROM CmsUser u WHERE u.id IN(46)", + "SELECT cu.name AS cu__name FROM cms_user cu WHERE cu.id IN (46)" + ); + } + + + // Ticket 894 + public function testBetweenDeclarationWithInputParameter() + { + $this->assertSqlGeneration( + "SELECT u.name FROM CmsUser u WHERE u.id BETWEEN ? AND ?", + "SELECT cu.name AS cu__name FROM cms_user cu WHERE cu.id BETWEEN ? AND ?" + ); + } + + public function testArithmeticExpressionsSupportedInWherePart() { $this->assertSqlGeneration(