From 23c8be77d35e158b9fe7090295c57f2c767c4d68 Mon Sep 17 00:00:00 2001 From: Andrii Semenets Date: Thu, 21 Dec 2023 14:14:04 +0200 Subject: [PATCH] Behat: fix creation of new options (add required params) --- tests/generator/lib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/generator/lib.php b/tests/generator/lib.php index 25d3526c7..f8c6d3e36 100755 --- a/tests/generator/lib.php +++ b/tests/generator/lib.php @@ -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 = [];