Commit fc2b7ba8 authored by zYne's avatar zYne

some auditlog tests added

parent 8fb82c2f
......@@ -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()
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment