From 33854a29685b14b4117ab3d20408138ef7fab1c4 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Mon, 25 Jan 2016 15:31:37 +0800 Subject: [PATCH] MDL-52683 mod_scorm: Test for scorm_get_last_completed_attempt --- mod/scorm/tests/lib_test.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mod/scorm/tests/lib_test.php b/mod/scorm/tests/lib_test.php index 31f4db0c13d..e5db5f1a089 100644 --- a/mod/scorm/tests/lib_test.php +++ b/mod/scorm/tests/lib_test.php @@ -181,4 +181,12 @@ class mod_scorm_lib_testcase extends externallib_advanced_testcase { 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)); + } } -- 2.43.0