-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9e213d
commit 35bc39d
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Wporg\TranslationEvents\Tests; | ||
|
||
use DateTimeImmutable; | ||
use DateTimeZone; | ||
|
||
class Event_Form_Handler_Factory { | ||
|
||
public function future_inactive_event_form_data( $form_name, DateTimeImmutable $now, $event_id = 0 ): array { | ||
$timezone = new DateTimeZone( 'Europe/Lisbon' ); | ||
$event_title = 'Foo title'; | ||
$event_description = 'Foo description'; | ||
$event_attendance_mode = 'hybrid'; | ||
$_event_id = isset( $event_id ) ? $event_id : 0; | ||
|
||
return array( | ||
'action' => 'submit_event_ajax', | ||
'form_name' => $form_name, | ||
'event_id' => $_event_id, | ||
'event_form_action' => 'publish', | ||
'event_title' => $event_title, | ||
'event_description' => $event_description, | ||
'event_start' => $now->modify( '+1 month' ), | ||
'event_end' => $now->modify( '+2 month' ), | ||
'event_timezone' => $timezone, | ||
'event_attendance_mode' => $event_attendance_mode, | ||
); | ||
|
||
} | ||
} |