MDL-79884 qtype_ordering: Add unit coverage and exemptions

Part of: MDL-79863
This commit is contained in:
Mathew May 2023-11-24 10:23:33 +08:00
parent de5fc46b41
commit cf1bcfce18
2 changed files with 39 additions and 0 deletions

View File

@ -32,6 +32,8 @@
* @param array $args extra arguments
* @param bool $forcedownload whether or not force download
* @param array $options additional options affecting the file serving
* @codeCoverageIgnore
* This code can not be tested currently as pluginfile() is not testable.
*/
function qtype_ordering_pluginfile(stdClass $course, stdClass $cm, stdClass $context, string $filearea, array $args,
bool $forcedownload, array $options = []) {

View File

@ -0,0 +1,37 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();
/**
* Coverage information for the qtype_ordering subsystem.
*
* @copyright 2023 Mathew May <mathew.solutions>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
return new class extends phpunit_coverage_info {
/** @var array The list of folders relative to the plugin root to include in coverage generation. */
protected $includelistfolders = [
'backup',
];
/** @var array The list of files relative to the plugin root to include in coverage generation. */
protected $includelistfiles = [
'edit_ordering_form.php',
'question.php',
'questiontype.php',
];
};