fix random failure of modlog test
authorPaul Mehrer <p.mehrer@metaways.de>
Mon, 6 Mar 2017 11:20:35 +0000 (12:20 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 6 Mar 2017 12:29:13 +0000 (13:29 +0100)
Change-Id: I4c59f79fefd8a06f87f46a4592d9ed1908925484
Reviewed-on: http://gerrit.tine20.com/customers/4304
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/Tinebase/Timemachine/ModificationLogTest.php

index 458ca09..38a28ff 100644 (file)
@@ -268,7 +268,7 @@ class Tinebase_Timemachine_ModificationLogTest extends PHPUnit_Framework_TestCas
             Tinebase_DateTime::now()->subSecond(5), Tinebase_DateTime::now())->getFirstRecord();
         $this->assertTrue($modlog !== NULL);
         $this->assertEquals(2, $modlog->seq);
-        $this->assertEquals('+491234', $modlog->old_value);
+        $this->assertContains('1234', $modlog->old_value);
         
         $filter = new Tinebase_Model_ModificationLogFilter(array(
             array('field' => 'record_type',         'operator' => 'equals', 'value' => 'Addressbook_Model_Contact'),
@@ -277,7 +277,7 @@ class Tinebase_Timemachine_ModificationLogTest extends PHPUnit_Framework_TestCas
         ));
         $result = $this->_modLogClass->undo($filter);
         $this->assertEquals(1, $result['totalcount'], 'did not get 1 undone modlog: ' . print_r($result, TRUE));
-        $this->assertEquals('+491234', $result['undoneModlogs']->getFirstRecord()->old_value);
+        $this->assertContains('1234', $result['undoneModlogs']->getFirstRecord()->old_value);
         
         // check record after undo
         $contact = Addressbook_Controller_Contact::getInstance()->get($contact);