Proyectos de Subversion Moodle

Rev

Rev 11 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11 Rev 1441
Línea 25... Línea 25...
25
 * @category   test
25
 * @category   test
26
 * @copyright  2020 Claude Vervoort <claude.vervoort@cengage.com>
26
 * @copyright  2020 Claude Vervoort <claude.vervoort@cengage.com>
27
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28
 * @coversDefaultClass \mod_lti\service\gradebookservices\local\gradebookservices
28
 * @coversDefaultClass \mod_lti\service\gradebookservices\local\gradebookservices
29
 */
29
 */
30
class gradebookservices_test extends \advanced_testcase {
30
final class gradebookservices_test extends \advanced_testcase {
31
    /**
31
    /**
32
     * Load the necessary libs for the tests.
32
     * Load the necessary libs for the tests.
33
     */
33
     */
34
    public static function setUpBeforeClass(): void {
34
    public static function setUpBeforeClass(): void {
35
        global $CFG;
35
        global $CFG;
36
        require_once($CFG->dirroot . '/mod/lti/locallib.php');
36
        require_once($CFG->dirroot . '/mod/lti/locallib.php');
-
 
37
        parent::setUpBeforeClass();
37
    }
38
    }
Línea 38... Línea 39...
38
 
39
 
39
    /**
40
    /**
40
     * @covers ::instance_added
41
     * @covers ::instance_added
Línea 376... Línea 377...
376
     * @param string|null $tag tag
377
     * @param string|null $tag tag
377
     * @param int|null $ltiinstanceid Id of the LTI instance the standalone line item will be related to.
378
     * @param int|null $ltiinstanceid Id of the LTI instance the standalone line item will be related to.
378
     *
379
     *
379
     */
380
     */
380
    private function create_standalone_lineitem(int $courseid, int $typeid, ?string $resourceid,
381
    private function create_standalone_lineitem(int $courseid, int $typeid, ?string $resourceid,
381
            ?string $tag, int $ltiinstanceid = null): void {
382
            ?string $tag, ?int $ltiinstanceid = null): void {
382
        $gbservice = new gradebookservices();
383
        $gbservice = new gradebookservices();
383
        $gbservice->add_standalone_lineitem($courseid,
384
        $gbservice->add_standalone_lineitem($courseid,
384
            "manualtest",
385
            "manualtest",
385
            10,
386
            10,
386
            "https://test.phpunit",
387
            "https://test.phpunit",