Changeset 4570
- Timestamp:
- 06/27/08 17:10:14 (6 months ago)
- Files:
-
- 1 modified
-
branches/0.11/tests/Ticket/1175TestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/tests/Ticket/1175TestCase.php
r4568 r4570 45 45 $b->Images[] = $img; 46 46 47 $img = new gBlogFile(); 48 $img->filename = 'blog file 1'; 49 $b->Files[] = $img; 50 47 51 $b->save(); 48 52 49 $q = new Doctrine_Query(); 50 $u = $q->from('gUser u')->leftJoin('u.Images i')->leftJoin('u.Files f')->where('u.id = ?',array(1))->fetchOne(); 51 53 $q = Doctrine_Query::create() 54 ->from('gUser u') 55 ->leftJoin('u.Images i') 56 ->leftJoin('u.Files f') 57 ->where('u.id = ?', array(1)); 58 59 $this->assertEqual($q->getSql(), 'SELECT g.id AS g__id, g.first_name AS g__first_name, g.last_name AS g__last_name, g2.id AS g2__id, g2.owner_id AS g2__owner_id, g2.filename AS g2__filename, g2.otype AS g2__otype, g3.id AS g3__id, g3.owner_id AS g3__owner_id, g3.filename AS g3__filename, g3.otype AS g3__otype FROM g_user g LEFT JOIN g_image g2 ON g.id = g2.owner_id AND g2.otype = 1 LEFT JOIN g_file g3 ON g.id = g3.owner_id AND g3.otype = 1 WHERE g.id = ?'); 60 61 $u = $q->fetchOne(); 52 62 $this->assertTrue( is_object($u) ); 53 63 if(is_object($u))