diff --git a/question/type/ordering/lib.php b/question/type/ordering/lib.php index bf6ff52d67d..cad44589c98 100644 --- a/question/type/ordering/lib.php +++ b/question/type/ordering/lib.php @@ -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 = []) { diff --git a/question/type/ordering/tests/coverage.php b/question/type/ordering/tests/coverage.php new file mode 100644 index 00000000000..d40a9126f94 --- /dev/null +++ b/question/type/ordering/tests/coverage.php @@ -0,0 +1,37 @@ +. + +defined('MOODLE_INTERNAL') || die(); + +/** + * Coverage information for the qtype_ordering subsystem. + * + * @copyright 2023 Mathew May + * @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', + ]; +};