From 25115a3e02017b88d9fba85a3694766e98ec501c Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 24 Jun 2019 14:55:19 +1200 Subject: [PATCH] Follow up to receive_date convert to datepicker - update test --- tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php | 8 +++----- tests/phpunit/CiviTest/CiviUnitTestCase.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php b/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php index 0b4a7a90d7..43bcf0eb36 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php @@ -184,23 +184,21 @@ class CRM_Contact_BAO_SavedSearchTest extends CiviUnitTestCase { 'operator' => 'AND', 'event_relative' => 'this.month', 'participant_relative' => 'today', - 'contribution_date_relative' => 'this.week', 'participant_test' => 0, 'title' => 'testsmart', 'radio_ts' => 'ts_all', ); - $queryParams = array(); + $queryParams = []; CRM_Contact_BAO_SavedSearch::saveRelativeDates($queryParams, $formValues); CRM_Contact_BAO_SavedSearch::saveSkippedElement($queryParams, $formValues); $savedSearch->form_values = serialize($queryParams); $savedSearch->save(); $result = CRM_Contact_BAO_SavedSearch::getFormValues(CRM_Core_DAO::singleValueQuery('SELECT LAST_INSERT_ID()')); - $expectedResult = array( + $expectedResult = [ 'event' => 'this.month', 'participant' => 'today', - 'contribution' => 'this.week', - ); + ]; $this->checkArrayEquals($result['relative_dates'], $expectedResult); } diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index f40a07df21..720553175c 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -1899,7 +1899,7 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) public function checkArrayEquals(&$actual, &$expected) { self::unsetId($actual); self::unsetId($expected); - $this->assertEquals($actual, $expected); + $this->assertEquals($expected, $actual); } /** -- 2.25.1