From: eileen Date: Fri, 5 Apr 2019 01:38:50 +0000 (+1300) Subject: Improve data when known time-dependent-failing test fails X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=350f28f731223c22e858fef7ed47e52736c8fbb7;p=civicrm-core.git Improve data when known time-dependent-failing test fails --- diff --git a/tests/phpunit/CRM/Report/FormTest.php b/tests/phpunit/CRM/Report/FormTest.php index 61b70b18a4..bed5587d59 100644 --- a/tests/phpunit/CRM/Report/FormTest.php +++ b/tests/phpunit/CRM/Report/FormTest.php @@ -83,8 +83,7 @@ class CRM_Report_FormTest extends CiviUnitTestCase { public function testGetFromTo($expectedFrom, $expectedTo, $relative, $from, $to) { $obj = new CRM_Report_Form(); list($calculatedFrom, $calculatedTo) = $obj->getFromTo($relative, $from, $to); - $this->assertEquals($expectedFrom, $calculatedFrom); - $this->assertEquals($expectedTo, $calculatedTo); + $this->assertEquals([$expectedFrom, $expectedTo], [$calculatedFrom, $calculatedTo], "fail on data set [ $relative , $from , $to ]. Local php time is " . date('Y-m-d H:i:s') . ' and mysql time is ' . CRM_Core_DAO::singleValueQuery('SELECT NOW()')); } }