MDL-52683 mod_scorm: Test for scorm_get_last_completed_attempt
authorDavid Monllao <davidm@moodle.com>
Mon, 25 Jan 2016 07:31:37 +0000 (15:31 +0800)
committerDavid Monllao <davidm@moodle.com>
Fri, 29 Jan 2016 02:15:17 +0000 (10:15 +0800)
mod/scorm/tests/lib_test.php

index 31f4db0..e5db5f1 100644 (file)
@@ -181,4 +181,12 @@ class mod_scorm_lib_testcase extends externallib_advanced_testcase {
         scorm_require_available($this->scorm, false);
     }
 
         scorm_require_available($this->scorm, false);
     }
 
+    /**
+     * Test scorm_get_last_completed_attempt
+     *
+     * @return void
+     */
+    public function test_scorm_get_last_completed_attempt() {
+        $this->assertEquals(1, scorm_get_last_completed_attempt($this->scorm->id, $this->student->id));
+    }
 }
 }