Commit 96a40f00 authored by guilhermeblanco's avatar guilhermeblanco

Some tickets test cases

parent 73985fe6
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment