1
0
mirror of synced 2025-01-18 06:21:40 +03:00

More tests for Many to Many relations, bugs detected

This commit is contained in:
jackbravo 2007-09-05 05:39:36 +00:00
parent d0efd96e8d
commit fbb4e3bbe6

View File

@ -742,6 +742,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$gf = $this->connection->getTable("Group");
$this->assertTrue($user->Group instanceof Doctrine_Collection);
$this->assertTrue($user->Group[0]->id == 3);
// ADDING ASSOCIATED REFERENCES
@ -784,6 +785,8 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->connection->clear();
$user = $this->objTable->find(5);
$this->assertEqual($user->Group->count(), 1);
$this->assertTrue($user->Group[0]->id == 3);
$this->assertTrue($gf->findAll()->count() == 3);
// REPLACING OLD ASSOCIATED REFERENCE