From d037332e90f91c378400d9bcb35a678bf62b68f6 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 4 Apr 2022 14:11:41 +1200 Subject: [PATCH] Test usability fix Having the dummy data in the past causes debugging pain --- tests/phpunit/CRM/Utils/TokenConsistencyTest.php | 2 ++ tests/phpunit/CiviTest/CiviUnitTestCase.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/CRM/Utils/TokenConsistencyTest.php b/tests/phpunit/CRM/Utils/TokenConsistencyTest.php index 2bdb4fd99f..6b68dd0198 100644 --- a/tests/phpunit/CRM/Utils/TokenConsistencyTest.php +++ b/tests/phpunit/CRM/Utils/TokenConsistencyTest.php @@ -954,6 +954,8 @@ December 21st, 2007 ])->execute()->first()['id']; $this->ids['event'][0] = $this->eventCreate([ 'description' => 'event description', + 'end_date' => 20081023, + 'registration_end_date' => 20081015, $this->getCustomFieldName('text') => 'my field', 'loc_block_id' => $locationBlockID, ])['id']; diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 82c7f0a909..bcb7849dc7 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -864,7 +864,7 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase { $this->ids['Contact']['participant'] = $params['contact_id'] = $this->individualCreate(); } if (empty($params['event_id'])) { - $event = $this->eventCreate(); + $event = $this->eventCreate(['end_date' => 20081023, 'registration_end_date' => 20081015]); $params['event_id'] = $event['id']; } $defaults = [ @@ -1119,10 +1119,10 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase { 'event_type_id' => 1, 'is_public' => 1, 'start_date' => 20081021, - 'end_date' => 20081023, + 'end_date' => '+ 1 month', 'is_online_registration' => 1, 'registration_start_date' => 20080601, - 'registration_end_date' => 20081015, + 'registration_end_date' => '+ 1 month', 'max_participants' => 100, 'event_full_text' => 'Sorry! We are already full', 'is_monetary' => 0, -- 2.25.1