Improve data when known time-dependent-failing test fails
authoreileen <emcnaughton@wikimedia.org>
Fri, 5 Apr 2019 01:38:50 +0000 (14:38 +1300)
committereileen <emcnaughton@wikimedia.org>
Fri, 5 Apr 2019 01:38:50 +0000 (14:38 +1300)
tests/phpunit/CRM/Report/FormTest.php

index 61b70b18a479448547574433c6dda9b046ecf48d..bed5587d5924613ee22a9ddd132004e158961161 100644 (file)
@@ -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()'));
   }
 
 }