1
0
mirror of synced 2024-12-14 07:06:04 +03:00

minor bug fixes

This commit is contained in:
zYne 2007-06-14 21:26:45 +00:00
parent 271b45595d
commit ea6c4a1889
2 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,11 @@ class Doctrine_Relation_OneToOne_TestCase extends Doctrine_UnitTestCase
public function prepareData() public function prepareData()
{ } { }
public function prepareTables() public function prepareTables()
{ } {
$this->tables = array('Record_City', 'Record_Country', 'SelfRefTest');
parent::prepareTables();
}
public function testOneToOneAggregateRelationWithAliasesIsSupported() public function testOneToOneAggregateRelationWithAliasesIsSupported()
{ {
$city = new Record_City(); $city = new Record_City();

View File

@ -69,9 +69,8 @@ class Doctrine_Relation_TestCase extends Doctrine_UnitTestCase {
$this->assertTrue($rel instanceof Doctrine_Relation_LocalKey); $this->assertTrue($rel instanceof Doctrine_Relation_LocalKey);
} }
public function testManyToManyRelation() { public function testManyToManyRelation() {
$this->manager->setAttribute(Doctrine::ATTR_CREATE_TABLES, false);
$user = new User(); $user = new User();
// test that join table relations can be initialized even before the association have been initialized // test that join table relations can be initialized even before the association have been initialized
try { try {
$user->Groupuser; $user->Groupuser;
@ -96,7 +95,6 @@ class Doctrine_Relation_TestCase extends Doctrine_UnitTestCase {
$user = new User(); $user = new User();
$this->assertTrue($user->getTable()->getRelation('Phonenumber') instanceof Doctrine_Relation_ForeignKey); $this->assertTrue($user->getTable()->getRelation('Phonenumber') instanceof Doctrine_Relation_ForeignKey);
$this->manager->setAttribute(Doctrine::ATTR_CREATE_TABLES, true);
} }
} }
class RelationTest extends Doctrine_Record class RelationTest extends Doctrine_Record