diff --git a/grade/tests/behat/behat_grades.php b/grade/tests/behat/behat_grades.php index 16212fed070..dfc63145536 100644 --- a/grade/tests/behat/behat_grades.php +++ b/grade/tests/behat/behat_grades.php @@ -58,7 +58,9 @@ class behat_grades extends behat_base { ); // This plugin is not in the list of plugins. Check the pluginname string. - $names = array_map(fn($name) => strtolower(get_string('pluginname', "gradereport_{$name}")), $plugins); + $names = array_map(function($name) { + return strtolower(get_string('pluginname', "gradereport_{$name}")); + }, $plugins); $result = array_search($pluginname, $names); if ($result === false) { throw new \coding_exception("Unknown plugin '{$pluginname}'");