CRM-16101 - reminder tests: fix flapping status
authorAndrew Hunt <andrew@aghstrategies.com>
Tue, 17 Mar 2015 15:15:01 +0000 (11:15 -0400)
committerAndrew Hunt <andrew@aghstrategies.com>
Tue, 17 Mar 2015 15:15:01 +0000 (11:15 -0400)
tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php

index 1282616078cc788c8de4e148d2edcd07a9a467b5..ce2df799bfeb260cf00a5bb43af8286d8af5e1ff 100755 (executable)
@@ -955,12 +955,12 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
     $this->assertCronRuns(array(
       array(
         // On some random day, no email.
-        'time' => '2014-03-07 01:00:00',
+        'time' => date('Y-m-d H:i:s', strtotime($contact['values'][$contact['id']]['modified_date'] . ' -60 days')),
         'recipients' => array(),
       ),
       array(
         // On the eve of 3 years after they were modified, send an email.
-        'time' => date('Y-m-d H:i:s', strtotime($contact['values'][$contact['id']]['modified_date'] . ' +3 years -1 day')),
+        'time' => date('Y-m-d H:i:s', strtotime($contact['values'][$contact['id']]['modified_date'] . ' +3 years -23 hours')),
         'recipients' => array(array('test-bday@example.com')),
       ),
     ));