MDL-71619 privacy: extend correct class in provider testcases.

Extending the privacy provider testcase means that it's tearDown
method will reset the request writer.
This commit is contained in:
Paul Holden 2021-05-13 10:54:04 +01:00
parent ad8b3d2ba9
commit 21c3869d03
8 changed files with 15 additions and 11 deletions

View File

@ -28,7 +28,6 @@ defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/../lib.php');
use \mod_assignment\privacy\provider;
use \core_privacy\local\metadata\collection;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\transform;
use \core_privacy\local\request\writer;
@ -42,7 +41,7 @@ use \core_privacy\tests\provider_testcase;
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mod_assignment_privacy_testcase extends advanced_testcase {
class mod_assignment_privacy_testcase extends provider_testcase {
/**
* @var int array Array of test student ids associated for Course 1.

View File

@ -27,6 +27,7 @@ use core_privacy\local\request\approved_userlist;
use core_privacy\local\request\userlist;
use core_privacy\local\request\writer;
use core_privacy\tests\request\approved_contextlist;
use core_privacy\tests\provider_testcase;
use quizaccess_seb\privacy\provider;
use quizaccess_seb\quiz_settings;
@ -40,7 +41,7 @@ require_once(__DIR__ . '/test_helper_trait.php');
* @copyright 2020 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class quizaccess_seb_provider_testcase extends advanced_testcase {
class quizaccess_seb_provider_testcase extends provider_testcase {
use quizaccess_seb_test_helper_trait;
/**

View File

@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
global $CFG;
use core_privacy\local\request\writer;
use core_privacy\tests\provider_testcase;
/**
* Unit tests for the privacy API implementation.
@ -35,7 +36,7 @@ use core_privacy\local\request\writer;
* @copyright 2018 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class workshopform_accumulative_privacy_provider_testcase extends advanced_testcase {
class workshopform_accumulative_privacy_provider_testcase extends provider_testcase {
/**
* Test {@link workshopform_accumulative\privacy\provider::export_assessment_form()} implementation.

View File

@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
global $CFG;
use core_privacy\local\request\writer;
use core_privacy\tests\provider_testcase;
/**
* Unit tests for the privacy API implementation.
@ -35,7 +36,7 @@ use core_privacy\local\request\writer;
* @copyright 2018 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class workshopform_comments_privacy_provider_testcase extends advanced_testcase {
class workshopform_comments_privacy_provider_testcase extends provider_testcase {
/**
* Test {@link workshopform_comments\privacy\provider::export_assessment_form()} implementation.

View File

@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
global $CFG;
use core_privacy\local\request\writer;
use core_privacy\tests\provider_testcase;
/**
* Unit tests for the privacy API implementation.
@ -35,7 +36,7 @@ use core_privacy\local\request\writer;
* @copyright 2018 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class workshopform_numerrors_privacy_provider_testcase extends advanced_testcase {
class workshopform_numerrors_privacy_provider_testcase extends provider_testcase {
/**
* Test {@link workshopform_numerrors\privacy\provider::export_assessment_form()} implementation.

View File

@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
global $CFG;
use core_privacy\local\request\writer;
use core_privacy\tests\provider_testcase;
/**
* Unit tests for the privacy API implementation.
@ -35,7 +36,7 @@ use core_privacy\local\request\writer;
* @copyright 2018 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class workshopform_rubric_privacy_provider_testcase extends advanced_testcase {
class workshopform_rubric_privacy_provider_testcase extends provider_testcase {
/**
* Test {@link workshopform_rubric\privacy\provider::export_assessment_form()} implementation.

View File

@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
global $CFG;
use core_privacy\local\request\writer;
use core_privacy\tests\provider_testcase;
/**
* Unit tests for the privacy API implementation.
@ -35,7 +36,7 @@ use core_privacy\local\request\writer;
* @copyright 2018 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mod_workshop_privacy_provider_testcase extends advanced_testcase {
class mod_workshop_privacy_provider_testcase extends provider_testcase {
/** @var testing_data_generator */
protected $generator;

View File

@ -22,10 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/
defined('MOODLE_INTERNAL') || die();
use \report_stats\privacy\provider;
use \core_privacy\local\request\approved_userlist;
use \core_privacy\tests\provider_testcase;
/**
* Class report_stats_privacy_testcase
@ -34,7 +33,7 @@ use \core_privacy\local\request\approved_userlist;
* @copyright 2018 Adrian Greeve <adriangreeve.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/
class report_stats_privacy_testcase extends advanced_testcase {
class report_stats_privacy_testcase extends provider_testcase {
/**
* Convenience function to create stats.