forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
135 changed files
with
174 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
* @copyright 2018 Carlos Escobedo <[email protected]> | ||
* @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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ | |
* @copyright 2018 Zig Tan <[email protected]> | ||
* @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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ | |
* @copyright 2020 Paul Holden <[email protected]> | ||
* @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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
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 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
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 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
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 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
* @copyright 2018 Carlos Escobedo <[email protected]> | ||
* @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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ | |
* @copyright 2018 Sara Arjona <[email protected]> | ||
* @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; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
* @copyright 2018 Andrew Nicols <[email protected]> | ||
* @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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ | |
* @copyright 2018 Carlos Escobedo <[email protected]> | ||
* @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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
* @copyright 2018 Victor Deniz <[email protected]> | ||
* @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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ | |
* @copyright 2018 Carlos Escobedo <[email protected]> | ||
* @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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
* @copyright 2018 Mark Nelson <[email protected]> | ||
* @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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,12 +30,12 @@ | |
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* Class block_comments_privacy_provider_testcase. | ||
* Privacy provider test for block_comments. | ||
* | ||
* @copyright 2018 Shamim Rezaie <[email protected]> | ||
* @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 A student who is only enrolled in course1. */ | ||
protected $student1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
* @copyright 2018 Andrew Nicols <[email protected]> | ||
* @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 { | ||
/** | ||
* Get the list of standard format options for comparison. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
* @copyright 2018 Peter Dias <[email protected]> | ||
* @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 { | ||
/** | ||
* Ensure that export_user_preferences returns no data if the user has not visited the myoverview block. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
* @copyright 2018 Mihail Geshoski <[email protected]> | ||
* @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 { | ||
|
||
/** | ||
* Basic setup for these tests. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
* @copyright 2018 Peter Dias <[email protected]> | ||
* @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 { | ||
|
||
/** | ||
* Ensure that export_user_preferences returns no data if the user has not visited the myoverview block. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
* @copyright 2018 Zig Tan <[email protected]> | ||
* @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 { | ||
|
||
/** | ||
* Overriding setUp() function to always reset after tests. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ | |
* @copyright 2018 Sara Arjona <[email protected]> | ||
* @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 { | ||
|
||
/** | ||
* Basic setup for these tests. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ | |
* @copyright 2018 Adrian Greeve <[email protected]> | ||
* @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 { | ||
|
||
protected function setUp(): void { | ||
$this->resetAfterTest(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ | |
* @author Frédéric Massart <[email protected]> | ||
* @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 $PAGE; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
* @copyright 2020 Carlos Escobedo <[email protected]> | ||
* @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 { | ||
|
||
/** | ||
* Setup to ensure that fixtures are loaded. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,11 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
namespace core_courseformat\privacy; | ||
|
||
use context_course; | ||
use core_privacy\local\request\writer; | ||
|
||
/** | ||
* Privacy tests for core_courseformat. | ||
* | ||
|
@@ -22,13 +27,7 @@ | |
* @copyright 2021 Ferran Recio <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace core_courseformat\privacy; | ||
|
||
use context_course; | ||
use core_privacy\local\request\writer; | ||
|
||
class privacy_test extends \core_privacy\tests\provider_testcase { | ||
class provider_test extends \core_privacy\tests\provider_testcase { | ||
|
||
/** | ||
* Test for provider::test_export_user_preferences(). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
* @copyright 2018 Adrian Greeve <[email protected]> | ||
* @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 { | ||
|
||
use \completion_creation; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.