From db02c85e57a4cd8dfaf693fb832caf502a86cf5c Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 7 Jun 2007 18:31:03 +0000 Subject: [PATCH] --- tests/Query/FromTestCase.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/Query/FromTestCase.php b/tests/Query/FromTestCase.php index 0785387a0..97452cad2 100644 --- a/tests/Query/FromTestCase.php +++ b/tests/Query/FromTestCase.php @@ -32,6 +32,16 @@ */ class Doctrine_Query_From_TestCase extends Doctrine_UnitTestCase { + public function prepareData() + { } + public function prepareTables() + { } + public function testCount() + { + $count = Doctrine_Query::create()->from('User')->count(); + + $this->assertEqual($count, 0); + } public function testLeftJoin() { $q = new Doctrine_Query(); @@ -90,10 +100,6 @@ class Doctrine_Query_From_TestCase extends Doctrine_UnitTestCase $q->select('u.name')->from('User u INNER JOIN u.Group, u.Phonenumber'); $this->assertEqual($q->getQuery(), "SELECT e.id AS e__id, e.name AS e__name FROM entity e INNER JOIN groupuser g ON e.id = g.user_id INNER JOIN entity e2 ON e2.id = g.group_id INNER JOIN phonenumber p ON e.id = p.entity_id WHERE (e.type = 0 AND (e2.type = 1 OR e2.type IS NULL))"); - - $users = $q->execute(); - - $this->assertEqual($users->count(), 1); } public function testMixingOfJoins() {