. */ /** * Doctrine_Connection_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_Relation_OneToOne_TestCase extends Doctrine_UnitTestCase { public function testOneToOneAggregateRelationWithAliasesIsSupported() { $city = new Record_City(); $country = $city->Country; $this->assertTrue($country instanceof Record_Country); } } class Record_Country extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('name', 'string', 200); } } class Record_City extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('name', 'string', 200); $this->hasColumn('country_id', 'integer'); } public function setUp() { $this->hasOne('Record_Country as Country', 'Record_City.country_id'); } }