Skip to content

Commit

Permalink
Behat: fix creation of new options (add required params)
Browse files Browse the repository at this point in the history
  • Loading branch information
semteacher committed Dec 21, 2023
1 parent 5868875 commit 23c8be7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/generator/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ public function create_option($record = null) {

$record = (object) $record;

// Finalizing object with required properties.
$record->cmid = $cmb1->id;
$record->identifier = booking_option::create_truly_unique_option_identifier();

// Conversion of strings like ["optiondatestart[0]"]=> int(1690792686) into arrays (by ChatGPT).
$optiondatestart = [];
$optiondateend = [];
Expand Down

0 comments on commit 23c8be7

Please sign in to comment.