Beispiel #1
0
 public function testPrepare()
 {
     $this->_initSequenceTables();
     // test audit first
     $audit = new Audit();
     $audit->_ormPersist = true;
     $audit->objectClass = 'StdClass';
     $audit->persist();
     $this->assertTrue($audit->auditId > 0, 'Audit: Failed to persist');
     if ($audit->auditId > 0) {
         $audit->setPersistMode(WebVista_Model_ORM::DELETE);
         $audit->persist();
     }
     $auditValue = new AuditValue();
     $auditValue->_ormPersist = true;
     $auditValue->key = 'Key';
     $auditValue->value = 'Value';
     $auditValue->persist();
     $this->assertTrue($auditValue->auditValueId > 0, 'AuditValue: Failed to persist');
     if ($auditValue->auditValueId > 0) {
         $auditValue->setPersistMode(WebVista_Model_ORM::DELETE);
         $auditValue->persist();
     }
     if ($this->_autoLoggedIn) {
         $this->_setupAutoLogin();
     }
 }