@@ -262,7 +262,7 @@ public function test_view_php(): void {
262262 $ requirelogin = 'require_login($course, true, $cm) ' ;
263263 $ this ->assertStringContainsString ($ requirelogin , $ viewfile );
264264
265- $ seturl = "\$PAGE->set_url('/mod/demo/view.php', array( 'id' => \$cm->id) ) " ;
265+ $ seturl = "\$PAGE->set_url('/mod/demo/view.php', [ 'id' => \$cm->id] ) " ;
266266 $ this ->assertStringContainsString ($ seturl , $ viewfile );
267267
268268 $ header = 'echo $OUTPUT->header() ' ;
@@ -294,13 +294,13 @@ public function test_index_php(): void {
294294 $ requireconfig = "require(__DIR__.'/../../config.php') " ;
295295 $ this ->assertStringContainsString ($ requireconfig , $ indexfile );
296296
297- $ course = "\$DB->get_record('course', array( 'id' => \$id) , '*', MUST_EXIST) " ;
297+ $ course = "\$DB->get_record('course', [ 'id' => \$id] , '*', MUST_EXIST) " ;
298298 $ this ->assertStringContainsString ($ course , $ indexfile );
299299
300300 $ requirecourselogin = 'require_course_login($course) ' ;
301301 $ this ->assertStringContainsString ($ requirecourselogin , $ indexfile );
302302
303- $ seturl = "\$PAGE->set_url('/mod/demo/index.php', array( 'id' => \$id) ) " ;
303+ $ seturl = "\$PAGE->set_url('/mod/demo/index.php', [ 'id' => \$id] ) " ;
304304 $ this ->assertStringContainsString ($ seturl , $ indexfile );
305305
306306 $ header = 'echo $OUTPUT->header() ' ;
@@ -383,7 +383,7 @@ public function test_file_area_feature(): void {
383383 $ this ->assertStringContainsString ($ getfileinfo , $ libfile );
384384
385385 $ pluginfile = 'function demo_pluginfile( ' .
386- '$course, $cm, $context, $filearea, $args, $forcedownload, $options = array() ) ' ;
386+ '$course, $cm, $context, $filearea, $args, $forcedownload, $options = [] ) ' ;
387387 $ this ->assertStringContainsString ($ pluginfile , $ libfile );
388388 }
389389
0 commit comments