1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00
This commit is contained in:
zYne 2007-09-17 22:33:25 +00:00
parent 024b12f741
commit 879a213990

View file

@ -33,11 +33,14 @@
class Doctrine_Query_Registry_TestCase extends Doctrine_UnitTestCase class Doctrine_Query_Registry_TestCase extends Doctrine_UnitTestCase
{ {
public function prepareTables() public function prepareTables()
{ {
$this->tables = array('User'); $this->tables = array('User');
parent::prepareTables();
} }
public function prepareData() public function prepareData()
{ } { }
public function testAddingQueries() public function testAddingQueries()
{ {
$registry = new Doctrine_Query_Registry(); $registry = new Doctrine_Query_Registry();
@ -46,6 +49,7 @@ class Doctrine_Query_Registry_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($registry->get('all-users')->getDql(), 'SELECT u.* FROM User u'); $this->assertEqual($registry->get('all-users')->getDql(), 'SELECT u.* FROM User u');
} }
public function testAddingQueriesWithNamespaces() public function testAddingQueriesWithNamespaces()
{ {
$registry = new Doctrine_Query_Registry(); $registry = new Doctrine_Query_Registry();
@ -54,6 +58,8 @@ class Doctrine_Query_Registry_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($registry->get('all', 'User')->getDql(), 'SELECT u.* FROM User u'); $this->assertEqual($registry->get('all', 'User')->getDql(), 'SELECT u.* FROM User u');
$this->manager->setQueryRegistry($registry);
$user = new User(); $user = new User();
$user->fetch('all'); $user->fetch('all');