Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test usability fix #23096

Merged
merged 1 commit into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Test usability fix
Having the dummy data in the past causes debugging pain
  • Loading branch information
eileenmcnaughton committed Apr 4, 2022
commit d037332e90f91c378400d9bcb35a678bf62b68f6
2 changes: 2 additions & 0 deletions tests/phpunit/CRM/Utils/TokenConsistencyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,8 @@ protected function createEventAndParticipant(): void {
])->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'];
Expand Down
6 changes: 3 additions & 3 deletions tests/phpunit/CiviTest/CiviUnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ public function participantCreate(array $params = []) {
$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 = [
Expand Down Expand Up @@ -1119,10 +1119,10 @@ public function eventCreate(array $params = []): array {
'event_type_id' => 1,
'is_public' => 1,
'start_date' => 20081021,
'end_date' => 20081023,
'end_date' => '+ 1 month',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so a 6 year event? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seamuslee001 yeah - key thing is the end date is in the future & start date is in the past so when you try to use it you don't get told it is invalid

'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,
Expand Down