Commit e4a2d9c1 authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

MDL-73348 phpunit: normalize all privacy provider tests

As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
parent 57e6fb7a
......@@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist;
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
/**
* Test to check export_user_preferences.
* returns user preferences data.
......
......@@ -30,7 +30,7 @@ use core_privacy\tests\provider_testcase;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\privacy\provider
*/
class privacy_provider_test extends provider_testcase {
class provider_test extends provider_testcase {
/**
* Test for provider::get_metadata().
......
......@@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist;
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends \core_privacy\tests\provider_testcase {
class provider_test extends \core_privacy\tests\provider_testcase {
/**
* Overriding setUp() function to always reset after tests.
......
......@@ -39,7 +39,7 @@ use tool_dataprivacy\privacy\provider;
* @copyright 2020 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_provider_test extends provider_testcase {
class provider_test extends provider_testcase {
/**
* Test provider get_contexts_for_userid method
......
......@@ -35,7 +35,7 @@ use core_privacy\local\request\transform;
use core_privacy\local\request\writer;
use logstore_database\privacy\provider;
require_once(__DIR__ . '/fixtures/event.php');
require_once(__DIR__ . '/../fixtures/event.php');
/**
* Data provider testcase class.
......@@ -49,7 +49,7 @@ require_once(__DIR__ . '/fixtures/event.php');
* @author Frédéric Massart <fred@branchup.tech>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
public function setUp(): void {
global $CFG;
......
......@@ -36,7 +36,7 @@ use core_privacy\local\request\writer;
use logstore_legacy\privacy\provider;
use logstore_legacy\event\unittest_executed;
require_once(__DIR__ . '/fixtures/event.php');
require_once(__DIR__ . '/../fixtures/event.php');
/**
* Data provider testcase class.
......@@ -47,7 +47,7 @@ require_once(__DIR__ . '/fixtures/event.php');
* @author Frédéric Massart <fred@branchup.tech>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
public function setUp(): void {
$this->resetAfterTest();
......
......@@ -35,7 +35,7 @@ use core_privacy\local\request\transform;
use core_privacy\local\request\writer;
use logstore_standard\privacy\provider;
require_once(__DIR__ . '/fixtures/event.php');
require_once(__DIR__ . '/../fixtures/event.php');
/**
* Data provider testcase class.
......@@ -46,7 +46,7 @@ require_once(__DIR__ . '/fixtures/event.php');
* @author Frédéric Massart <fred@branchup.tech>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
public function setUp(): void {
$this->resetAfterTest();
......
......@@ -50,7 +50,7 @@ require_once($CFG->dirroot . '/admin/tool/log/store/standard/tests/fixtures/even
* @author Frédéric Massart <fred@branchup.tech>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
public function setUp(): void {
$this->resetAfterTest();
......
......@@ -45,7 +45,7 @@ use tool_messageinbound\privacy\provider;
* @author Frédéric Massart <fred@branchup.tech>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
public function setUp(): void {
global $CFG;
......
......@@ -37,7 +37,7 @@ use tool_mobile\privacy\provider;
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_provider_test extends \core_privacy\tests\provider_testcase {
class provider_test extends \core_privacy\tests\provider_testcase {
/**
* Basic setup for these tests.
......
......@@ -39,7 +39,7 @@ use core_privacy\tests\provider_testcase;
* @copyright 2018 Adrian Greeve <adriangreeve.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
/**
* Set up method.
......
......@@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die();
* @copyright 2018 Sara Arjona <sara@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_provider_test extends \core_privacy\tests\provider_testcase {
class provider_test extends \core_privacy\tests\provider_testcase {
/** @var stdClass The user object. */
protected $user;
......
......@@ -37,7 +37,7 @@ use tool_usertours\privacy\provider;
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_provider_test extends \core_privacy\tests\provider_testcase {
class provider_test extends \core_privacy\tests\provider_testcase {
/**
* Helper method for creating a tour
......
......@@ -31,10 +31,10 @@ use core_privacy\local\request\approved_userlist;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/fixtures/test_indicator_max.php');
require_once(__DIR__ . '/fixtures/test_indicator_min.php');
require_once(__DIR__ . '/fixtures/test_target_site_users.php');
require_once(__DIR__ . '/fixtures/test_target_course_users.php');
require_once(__DIR__ . '/../fixtures/test_indicator_max.php');
require_once(__DIR__ . '/../fixtures/test_indicator_min.php');
require_once(__DIR__ . '/../fixtures/test_target_site_users.php');
require_once(__DIR__ . '/../fixtures/test_target_course_users.php');
/**
* Unit tests for privacy.
......@@ -43,7 +43,7 @@ require_once(__DIR__ . '/fixtures/test_target_course_users.php');
* @copyright 2018 David Monllaó {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends \core_privacy\tests\provider_testcase {
class provider_test extends \core_privacy\tests\provider_testcase {
public function setUp(): void {
......
......@@ -38,7 +38,7 @@ use auth_manual\privacy\provider;
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_provider_test extends \core_privacy\tests\provider_testcase {
class provider_test extends \core_privacy\tests\provider_testcase {
/** @var \auth_plugin_manual Keeps the authentication plugin. */
protected $authplugin;
......
......@@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist;
* @copyright 2018 Victor Deniz <victor@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_provider_test extends provider_testcase {
class provider_test extends provider_testcase {
/**
* Set up method.
*/
......
......@@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist;
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_provider_test extends provider_testcase {
class provider_test extends provider_testcase {
/**
* Set up method.
*/
......
......@@ -42,7 +42,7 @@ use core_auth\privacy\provider;
* @author Frédéric Massart <fred@branchup.tech>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
public function setUp(): void {
$this->resetAfterTest();
......
......@@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die();
* @copyright 2018 Mark Nelson <markn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_provider_test extends \core_privacy\tests\provider_testcase {
class provider_test extends \core_privacy\tests\provider_testcase {
/**
* Test getting the context for the user ID related to this plugin.
......
......@@ -47,7 +47,7 @@ require_once($CFG->libdir . '/badgeslib.php');
* @author Frédéric Massart <fred@branchup.tech>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_test extends provider_testcase {
class provider_test extends provider_testcase {
public function setUp(): void {
$this->resetAfterTest();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment