$hook=newDoctrine_Hook('SELECT u.name FROM User u LEFT JOIN u.Phonenumber p');
...
...
@@ -53,7 +53,7 @@ class Doctrine_Hook_TestCase extends Doctrine_UnitTestCase
$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.type = 0) ORDER BY e.name ASC');
$hook=newDoctrine_Hook('SELECT u.name FROM User u LEFT JOIN u.Phonenumber p');
...
...
@@ -63,7 +63,7 @@ class Doctrine_Hook_TestCase extends Doctrine_UnitTestCase
$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.type = 0) ORDER BY e.name DESC');
$hook=newDoctrine_Hook('SELECT u.name FROM User u LEFT JOIN u.Phonenumber p');
...
...
@@ -73,7 +73,7 @@ class Doctrine_Hook_TestCase extends Doctrine_UnitTestCase
$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.type = 0)');
$hook=newDoctrine_Hook('SELECT u.name FROM User u LEFT JOIN u.Phonenumber p');
...
...
@@ -81,11 +81,11 @@ class Doctrine_Hook_TestCase extends Doctrine_UnitTestCase
$hook->hookOrderBy($a['orderby']);
$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.type = 0) ORDER BY e.name ASC, e.id DESC');
$users=$hook->getQuery()->execute();
}
publicfunctiontestHookWhereAcceptsArrays()
publicfunctiontestHookWhereAcceptsArrays()
{
$hook=newDoctrine_Hook('SELECT u.name FROM User u LEFT JOIN u.Phonenumber p');
...
...
@@ -94,10 +94,10 @@ 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');
...
...
@@ -119,37 +119,37 @@ class Doctrine_Hook_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($hook->getQuery()->getSql(),'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.type = 0)');