1
0
mirror of synced 2024-12-13 06:46:03 +03:00

added a little test

This commit is contained in:
romanb 2008-08-22 09:25:00 +00:00
parent 0f8e9e0ba9
commit 0b80ec0bfd

View File

@ -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'
);
} }
} }