. */ /** * Doctrine_NewCore_TestCase * * @package Doctrine * @author Konsta Vesterinen * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @category Object Relational Mapping * @link www.phpdoctrine.com * @since 1.0 * @version $Revision$ */ class Doctrine_NewCore_TestCase extends Doctrine_UnitTestCase { public function testFromParser() { $q = new Doctrine_Query(); $q->load('User u', true); $this->assertEqual($q->getQueryPart('from'), array('entity e')); $this->assertEqual(count($q->getAliasMap()), 1); $q->load('u.Phonenumber p', false); $this->assertEqual($q->getQueryPart('from'), array('entity e', 'p' => 'LEFT JOIN phonenumber p ON e.id = p.entity_id')); } }