test clean ups
authorPaul Mehrer <p.mehrer@metaways.de>
Mon, 10 Jul 2017 13:11:04 +0000 (15:11 +0200)
committerPaul Mehrer <p.mehrer@metaways.de>
Mon, 10 Jul 2017 13:05:57 +0000 (15:05 +0200)
Change-Id: Idd6430d55f4b284b8f764b6c3f974dda8c794849
Reviewed-on: http://gerrit.tine20.com/customers/5076
Reviewed-by: Paul Mehrer <p.mehrer@metaways.de>
Tested-by: Paul Mehrer <p.mehrer@metaways.de>
tests/tine20/Addressbook/ControllerTest.php
tests/tine20/Tinebase/Timemachine/ModificationLogTest.php
tine20/Tinebase/Timemachine/ModificationLog.php

index 02cd7ff..6a78557 100644 (file)
@@ -508,9 +508,6 @@ class Addressbook_ControllerTest extends TestCase
 
     public function testModLogUndo()
     {
-        // move this code to \Tinebase_Timemachine_ModificationLogTest::testFileManagerReplication etc.
-        //$instance_seq = Tinebase_Timemachine_ModificationLog::getInstance()->getMaxInstanceSeq();
-
         // activate ModLog in FileSystem!
         Tinebase_Config::getInstance()->{Tinebase_Config::FILESYSTEM}
             ->{Tinebase_Config::FILESYSTEM_MODLOGACTIVE} = true;
index daed19e..c79e8ac 100644 (file)
@@ -616,12 +616,7 @@ class Tinebase_Timemachine_ModificationLogTest extends PHPUnit_Framework_TestCas
 
     public function testUserReplication()
     {
-        $modifications = Tinebase_Timemachine_ModificationLog::getInstance()->getReplicationModificationsByInstanceSeq(-1, 10000);
-        if ($modifications->count() > 0) {
-            $instance_seq = $modifications->getLastRecord()->instance_seq;
-        } else {
-            $instance_seq = -1;
-        }
+        $instance_seq = Tinebase_Timemachine_ModificationLog::getInstance()->getMaxInstanceSeq();
 
         $userController = Tinebase_User::getInstance();
 
@@ -743,10 +738,7 @@ class Tinebase_Timemachine_ModificationLogTest extends PHPUnit_Framework_TestCas
     {
         Tinebase_Config::getInstance()->{Tinebase_Config::FILESYSTEM}
             ->{Tinebase_Config::FILESYSTEM_MODLOGACTIVE} = true;
-        $modifications = Tinebase_Timemachine_ModificationLog::getInstance()->
-            getReplicationModificationsByInstanceSeq(-1, 10000);
-        $instance_seq = $modifications->getLastRecord()->instance_seq;
-
+        $instance_seq = Tinebase_Timemachine_ModificationLog::getInstance()->getMaxInstanceSeq();
         $testPath = '/' . Tinebase_Model_Container::TYPE_PERSONAL . '/' . Tinebase_Core::getUser()->accountLoginName
             . '/unittestTestPath';
         $fmController = Filemanager_Controller_Node::getInstance();
index 4064f03..8be5ee5 100644 (file)
@@ -64,9 +64,6 @@ class Tinebase_Timemachine_ModificationLog implements Tinebase_Controller_Interf
      * 
      * @var array
      * 
-     * @todo move 'toOmit' fields to record (getModlogOmitFields)
-     * @todo allow notes modlog
-     * 
      * @see 0007494: add changes in notes to modlog/history
      */
     protected $_metaProperties = array(
@@ -74,13 +71,11 @@ class Tinebase_Timemachine_ModificationLog implements Tinebase_Controller_Interf
         'creation_time',
         'last_modified_by',
         'last_modified_time',
+        //do NOT add is_deleted!
         //'is_deleted',
         'deleted_time',
         'deleted_by',
         'seq',
-    // record specific properties / no meta properties
-    // @todo to be moved to (contact) record definition
-        'jpegphoto',
     );
     
     /**