Commit 0b80ec0b authored by romanb's avatar romanb

added a little test

parent 0f8e9e0b
...@@ -171,9 +171,13 @@ class Orm_Query_SelectSqlGenerationTest extends Doctrine_OrmTestCase ...@@ -171,9 +171,13 @@ class Orm_Query_SelectSqlGenerationTest extends Doctrine_OrmTestCase
public function testPlainJoinWithoutClause() public function testPlainJoinWithoutClause()
{ {
$this->assertSqlGeneration( $this->assertSqlGeneration(
'SELECT u.id, a.id FROM CmsUser u LEFT JOIN u.articles a', 'SELECT u.id, a.id from CmsUser u LEFT JOIN u.articles a',
'SELECT cu.id AS cu__id, ca.id AS ca__id FROM cms_user cu LEFT JOIN cms_article ca ON cu.id = ca.user_id WHERE 1 = 1' 'SELECT cu.id AS cu__id, ca.id AS ca__id FROM cms_user cu LEFT JOIN cms_article ca ON cu.id = ca.user_id WHERE 1 = 1'
); );
$this->assertSqlGeneration(
'SELECT u.id, a.id from CmsUser u JOIN u.articles a',
'SELECT cu.id AS cu__id, ca.id AS ca__id FROM cms_user cu INNER JOIN cms_article ca ON cu.id = ca.user_id WHERE 1 = 1'
);
} }
} }
\ No newline at end of file
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