MDL-50428 mod_scorm: Fix tests for mod_scorm_launch_sco
authorJuan Leyva <juanleyvadelgado@gmail.com>
Tue, 17 Nov 2015 12:23:26 +0000 (13:23 +0100)
committerJuan Leyva <juanleyvadelgado@gmail.com>
Tue, 29 Dec 2015 15:36:39 +0000 (16:36 +0100)
mod/scorm/tests/externallib_test.php

index 63a97d0..5a71a6a 100644 (file)
@@ -851,8 +851,8 @@ class mod_scorm_external_testcase extends externallib_advanced_testcase {
 
         // Invalid SCO.
         try {
 
         // Invalid SCO.
         try {
-            mod_scorm_external::launch_sco($this->scorm->id, 1);
-            $this->fail('Exception expected due to not enrolled user.');
+            mod_scorm_external::launch_sco($this->scorm->id, -1);
+            $this->fail('Exception expected due to invalid SCO id.');
         } catch (moodle_exception $e) {
             $this->assertEquals('cannotfindsco', $e->errorcode);
         }
         } catch (moodle_exception $e) {
             $this->assertEquals('cannotfindsco', $e->errorcode);
         }