Commit f6751a56 authored by zYne's avatar zYne

--no commit message

--no commit message
parent a3585598
...@@ -34,8 +34,7 @@ class Doctrine_Query_From_TestCase extends Doctrine_UnitTestCase ...@@ -34,8 +34,7 @@ class Doctrine_Query_From_TestCase extends Doctrine_UnitTestCase
{ {
public function prepareData() public function prepareData()
{ } { }
public function prepareTables()
{ }
public function testCount() public function testCount()
{ {
$count = Doctrine_Query::create()->from('User')->count(); $count = Doctrine_Query::create()->from('User')->count();
......
...@@ -211,6 +211,22 @@ class Doctrine_Query_Where_TestCase extends Doctrine_UnitTestCase ...@@ -211,6 +211,22 @@ class Doctrine_Query_Where_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($q->getQuery(), "SELECT e.id AS e__id FROM entity e WHERE e.name = 'foo.bar' AND (e.type = 0)"); $this->assertEqual($q->getQuery(), "SELECT e.id AS e__id FROM entity e WHERE e.name = 'foo.bar' AND (e.type = 0)");
} }
public function testDeepComponentReferencingIsSupported()
{
$q = new Doctrine_Query();
$q->select('u.id')->from('User u')->where("u.Group.name ='some group'");
$this->assertEqual($q->getQuery(), "SELECT e.id AS e__id FROM entity e LEFT JOIN groupuser g ON e.id = g.user_id LEFT JOIN entity e2 ON e2.id = g.group_id WHERE e2.name = 'some group' AND (e.type = 0 AND (e2.type = 1 OR e2.type IS NULL))");
}
public function testDeepComponentReferencingIsSupported2()
{
$q = new Doctrine_Query();
$q->select('u.id')->from('User u')->addWhere("u.Group.name ='some group'");
$this->assertEqual($q->getQuery(), "SELECT e.id AS e__id FROM entity e LEFT JOIN groupuser g ON e.id = g.user_id LEFT JOIN entity e2 ON e2.id = g.group_id WHERE e2.name = 'some group' AND (e.type = 0 AND (e2.type = 1 OR e2.type IS NULL))");
}
public function testEnumValuesWorkInPlaceholders() public function testEnumValuesWorkInPlaceholders()
{ {
$e = new EnumTest; $e = new EnumTest;
......
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