Commit 9ac324d7 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 78f8aea8
......@@ -30,8 +30,14 @@
* @since 1.0
* @version $Revision$
*/
class Doctrine_Query_Registry_TestCase
class Doctrine_Query_Registry_TestCase extends Doctrine_UnitTestCase
{
public function prepareTables()
{
$this->tables = array('User');
}
public function prepareData()
{ }
public function testAddingQueries()
{
$registry = new Doctrine_Query_Registry();
......@@ -40,4 +46,16 @@ class Doctrine_Query_Registry_TestCase
$this->assertEqual($registry->get('all-users')->getDql(), 'SELECT u.* FROM User u');
}
public function testAddingQueriesWithNamespaces()
{
$registry = new Doctrine_Query_Registry();
$registry->add('User/all', 'SELECT u.* FROM User u');
$this->assertEqual($registry->get('all', 'User')->getDql(), 'SELECT u.* FROM User u');
$user = new User();
$user->fetch('all');
}
}
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