1
0
mirror of synced 2024-12-13 14:56:01 +03:00

Improved some tests.

This commit is contained in:
romanb 2006-10-13 16:28:40 +00:00
parent 3e6a352a57
commit 765c06b7c1
2 changed files with 1127 additions and 1124 deletions

View File

@ -624,6 +624,8 @@ class Doctrine_RecordTestCase extends Doctrine_UnitTestCase {
$user->name = "John Locke";
$user->save();
$this->assertTrue(is_numeric($user->id) && $user->id > 0);
$this->assertTrue($user->getModified() == array());
$this->assertTrue($user->getState() == Doctrine_Record::STATE_CLEAN);

View File

@ -42,6 +42,7 @@ class Doctrine_RelationAccessTestCase extends Doctrine_UnitTestCase {
$us[1]->MyOtherThing->add($o);
}
// UserOneThings
/* Doctrine assigns the foreign keys automatically
$one_id_gs = array(
array(array(2,3,6,5,1), 1)
);
@ -63,7 +64,7 @@ class Doctrine_RelationAccessTestCase extends Doctrine_UnitTestCase {
$uo->user_id = $oth_ids[1];
}
}
*/
$this->connection->flush();
$this->connection->clear();
}
@ -76,7 +77,7 @@ class Doctrine_RelationAccessTestCase extends Doctrine_UnitTestCase {
"MyUserOtherThing");
parent::prepareTables();
}
/**
public function testOneToOneAggregateRelationFetching() {
$coll = $this->connection->query("FROM File_Owner.Data_File WHERE File_Owner.name = 'owner1'");
$this->assertTrue(count($coll) == 1);
@ -138,7 +139,7 @@ class Doctrine_RelationAccessTestCase extends Doctrine_UnitTestCase {
$this->assertEqual(1, $file2->get('id'));
}
*/
public function testMultipleLeftJoinBranches() {
$query = "FROM MyUserOtherThing";
$other = $this->connection->query($query);