diff --git a/course/format/tests/external/delete_section_test.php b/course/format/tests/external/delete_section_test.php index 1bbe717fd6a..f0625cb8eb2 100644 --- a/course/format/tests/external/delete_section_test.php +++ b/course/format/tests/external/delete_section_test.php @@ -61,7 +61,10 @@ final class delete_section_test extends \externallib_advanced_testcase { $this->resetAfterTest(); $course = - $this->getDataGenerator()->create_course(['numsections' => $sectionum, 'format' => $format, ...$formatoptions]); + $this->getDataGenerator()->create_course(array_merge( + ['numsections' => $sectionum, 'format' => $format], + $formatoptions, + )); $teacher = $this->getDataGenerator()->create_and_enrol($course, 'editingteacher'); // Execute the method. $courseformat = course_get_format($course->id);