Test usability fix
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 4 Apr 2022 02:11:41 +0000 (14:11 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 4 Apr 2022 07:47:11 +0000 (19:47 +1200)
Having the dummy data in the past causes debugging pain

tests/phpunit/CRM/Utils/TokenConsistencyTest.php
tests/phpunit/CiviTest/CiviUnitTestCase.php

index 2bdb4fd99fc1cdc0193b817488c632128c8d4e64..6b68dd019859a58cffd6f241b45216aed551829a 100644 (file)
@@ -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'];
index 82c7f0a9095775e28f74567b457cc3b1e557d1e8..bcb7849dc78cf3f3a08fb04bf4d6d2949ff6806b 100644 (file)
@@ -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,