1
0
mirror of synced 2025-01-18 14:31:40 +03:00

some auditlog tests added

This commit is contained in:
zYne 2007-10-08 22:59:39 +00:00
parent 8fb82c2f65
commit fc2b7ba81a
2 changed files with 13 additions and 2 deletions

View File

@ -55,7 +55,13 @@ class Doctrine_AuditLog_TestCase extends Doctrine_UnitTestCase
$entity->name = 'zYne 2';
$entity->save();
$this->assertEqual($entity->name, 'zYne 2');
$this->conn->clear();
$entity = $this->conn->getTable('VersioningTest')->find(1);
$this->assertEqual($entity->name, 'zYne 2');
$this->assertEqual($entity->version, 2);
$entity->delete();
@ -65,6 +71,12 @@ class Doctrine_AuditLog_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($entity->name, 'zYne 2');
$this->assertEqual($entity->version, 2);
$entity->revert(1);
$this->assertEqual($entity->name, 'zYne');
$this->assertEqual($entity->version, 1);
}
public function testRevertThrowsExceptionForTransientRecords()

View File

@ -223,6 +223,7 @@ $test->addTestCase($data_types);
$plugins = new GroupTest('Plugin tests: View, Validator, Hook');
//$utility->addTestCase(new Doctrine_PessimisticLocking_TestCase());
$plugins->addTestCase(new Doctrine_View_TestCase());
$plugins->addTestCase(new Doctrine_AuditLog_TestCase());
$plugins->addTestCase(new Doctrine_Validator_TestCase());
$plugins->addTestCase(new Doctrine_Validator_Future_TestCase());
$plugins->addTestCase(new Doctrine_Validator_Past_TestCase());
@ -312,8 +313,6 @@ $test->addTestCase(new Doctrine_Template_TestCase());
//$test->addTestCase(new Doctrine_IntegrityAction_TestCase());
//$test->addTestCase(new Doctrine_AuditLog_TestCase());
$test->addTestCase(new Doctrine_NestedSet_SingleRoot_TestCase());
// Search tests