@@ -51,8 +82,18 @@ class Doctrine_Hook_TestCase extends Doctrine_UnitTestCase {
$hook->hookWhere($a['where']);
$this->assertEqual($hook->getQuery()->getQuery(),'SELECT e.id AS e__id, e.name AS e__name FROM entity e LEFT JOIN phonenumber p ON e.id = p.entity_id WHERE (e.name LIKE ? OR e.name LIKE ?) AND e.loginname LIKE ? AND (e.type = 0)');
$hook=newDoctrine_Hook('SELECT u.name FROM User u LEFT JOIN u.Phonenumber p');
$a['where']=array('u.id'=>10000);
$hook->hookWhere($a['where']);
$this->assertEqual($hook->getQuery()->getQuery(),'SELECT e.id AS e__id, e.name AS e__name FROM entity e LEFT JOIN phonenumber p ON e.id = p.entity_id WHERE e.id = ? AND (e.type = 0)');