diff --git a/tests/AuditLogTestCase.php b/tests/AuditLogTestCase.php index 03f6bf826..8b5848696 100644 --- a/tests/AuditLogTestCase.php +++ b/tests/AuditLogTestCase.php @@ -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() diff --git a/tests/run.php b/tests/run.php index 4a42b34fd..e71e546ef 100644 --- a/tests/run.php +++ b/tests/run.php @@ -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