some auditlog tests added
This commit is contained in:
parent
8fb82c2f65
commit
fc2b7ba81a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user