MDL-51861 enrol: added missing external cleanup for formal compliance
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 6 Nov 2015 09:58:28 +0000 (10:58 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 6 Nov 2015 09:58:28 +0000 (10:58 +0100)
enrol/tests/externallib_test.php

index 8535d3d..db61fe9 100644 (file)
@@ -340,6 +340,9 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
             );
             $enrolledusers = core_enrol_external::get_enrolled_users($course->id, $options);
 
+            // We need to execute the return values cleaning process to simulate the web service server.
+            $enrolledusers = external_api::clean_returnvalue(core_enrol_external::get_enrolled_users_returns(), $enrolledusers);
+
             // We are only interested in ids to check visibility.
             $viewed = array();
             // Verify the user canview the expected users.