From ef99a587d344f50673088cfbbbb29454f68247c7 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Mon, 22 Feb 2021 18:04:03 +0100 Subject: [PATCH] MDL-70967 enrol_meta: fix error in unittest --- enrol/meta/tests/plugin_test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enrol/meta/tests/plugin_test.php b/enrol/meta/tests/plugin_test.php index 8fb9b1c74f459..6d75abe017538 100644 --- a/enrol/meta/tests/plugin_test.php +++ b/enrol/meta/tests/plugin_test.php @@ -1055,7 +1055,8 @@ public function test_edit_instance_validation() { $this->assertArrayHasKey('customint2', $errors); // Test with valid data. - $validgroup = reset($groups); + reset($groups); + $validgroup = key($groups); $data = [ 'customint1' => [$metacourse2->id], 'customint2' => $validgroup