Skip to content

Commit

Permalink
MDL-73278 phpunit: Rename already namespaced classes to match file name
Browse files Browse the repository at this point in the history
These are the only cases 100% safe to apply the renaming of the
testcase class names to match the file names.

All other cases are not safe, because they are missing namespace
and may enter into name conflicts. Adding namespaces is not as
simple as imagined because it implies to, also, add a good number
of modifications to core. See the issue for more details.
  • Loading branch information
stronk7 committed Dec 7, 2021
1 parent 5ee0b62 commit deb0e76
Show file tree
Hide file tree
Showing 138 changed files with 138 additions and 138 deletions.
2 changes: 1 addition & 1 deletion admin/tool/brickfield/tests/filters_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @author Jay Churchward ([email protected])
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class filter_test extends \advanced_testcase {
class filters_test extends \advanced_testcase {
public function test_constructor() {
$this->resetAfterTest();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @copyright 2020 Ferran Recio <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class langstring_testcase extends advanced_testcase {
class langstring_test extends advanced_testcase {

/**
* Sanity 1.x string
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/customlang/tests/local/mlang/phpparser_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @copyright 2015 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class phpparser_testcase extends advanced_testcase {
class phpparser_test extends advanced_testcase {


/**
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/moodlenet/tests/import_handler_info_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
* Class tool_moodlenet_import_handler_info_testcase, providing test cases for the import_handler_info class.
*/
class tool_moodlenet_import_handler_info_testcase extends \advanced_testcase {
class import_handler_info_test extends \advanced_testcase {

/**
* Test init and the getters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/**
* Class tool_moodlenet_import_handler_registry_testcase, providing test cases for the import_handler_registry class.
*/
class tool_moodlenet_import_handler_registry_testcase extends \advanced_testcase {
class import_handler_registry_test extends \advanced_testcase {

/**
* Test confirming the behaviour of get_resource_handlers_for_strategy with different params.
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/moodlenet/tests/import_info_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
* Class tool_moodlenet_import_info_testcase, providing test cases for the import_info class.
*/
class tool_moodlenet_import_info_testcase extends \advanced_testcase {
class import_info_test extends \advanced_testcase {

/**
* Create some test objects.
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/moodlenet/tests/import_processor_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/**
* Class tool_moodlenet_import_processor_testcase, providing test cases for the import_processor class.
*/
class tool_moodlenet_import_processor_testcase extends \advanced_testcase {
class import_processor_test extends \advanced_testcase {

/**
* An integration test, this confirms the ability to construct an import processor and run the import for the current user.
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/moodlenet/tests/remote_resource_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* Class tool_moodlenet_remote_resource_testcase, providing test cases for the remote_resource class.
*/
class tool_moodlenet_remote_resource_testcase extends \advanced_testcase {
class remote_resource_test extends \advanced_testcase {

/**
* Test getters.
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/moodlenet/tests/url_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* Class tool_moodlenet_url_testcase, providing test cases for the url class.
*/
class tool_moodlenet_url_testcase extends \advanced_testcase {
class url_test extends \advanced_testcase {

/**
* Test the parsing to host + path components.
Expand Down
2 changes: 1 addition & 1 deletion blocks/html/tests/search_content_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @copyright 2017 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class search_content_testcase extends \advanced_testcase {
class search_content_test extends \advanced_testcase {

/**
* Creates an HTML block on a course.
Expand Down
2 changes: 1 addition & 1 deletion completion/tests/completion_criteria_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @copyright 2021 Mikhail Golenkov <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_completion_criteria_testcase extends \advanced_testcase {
class completion_criteria_test extends \advanced_testcase {

/**
* Test setup.
Expand Down
2 changes: 1 addition & 1 deletion contentbank/tests/content_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* @coversDefaultClass \core_contentbank\content
*
*/
class core_contenttype_content_testcase extends \advanced_testcase {
class content_test extends \advanced_testcase {

/**
* Setup to ensure that fixtures are loaded.
Expand Down
2 changes: 1 addition & 1 deletion contentbank/tests/contenttype_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* @coversDefaultClass \core_contentbank\contenttype
*
*/
class core_contenttype_contenttype_testcase extends \advanced_testcase {
class contenttype_test extends \advanced_testcase {

/** @var int Identifier for the manager role. */
protected $managerroleid;
Expand Down
2 changes: 1 addition & 1 deletion contentbank/tests/external/delete_content_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @copyright 2020 Sara Arjona <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class delete_content_testcase extends externallib_advanced_testcase {
class delete_content_test extends externallib_advanced_testcase {

/**
* Test the behaviour of delete_content().
Expand Down
2 changes: 1 addition & 1 deletion contentbank/tests/external/rename_content_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_contentbank\external
*/
class rename_content_testcase extends \externallib_advanced_testcase {
class rename_content_test extends \externallib_advanced_testcase {

/**
* Data provider for test_rename_content.
Expand Down
2 changes: 1 addition & 1 deletion contentbank/tests/privacy_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @copyright 2020 Carlos Escobedo <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_contentbank_privacy_testcase extends provider_testcase {
class privacy_test extends provider_testcase {

/**
* Setup to ensure that fixtures are loaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2020 Jake Dallimore <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class caching_content_item_readonly_repository_testcase extends \advanced_testcase {
class caching_content_item_readonly_repository_test extends \advanced_testcase {
/**
* Test verifying that content items are cached and returned from the cache in subsequent same-request calls.
*/
Expand Down
2 changes: 1 addition & 1 deletion course/tests/category_hooks_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/**
* Functional test for class core_course_category methods invoking hooks.
*/
class core_course_category_hooks_testcase extends \advanced_testcase {
class category_hooks_test extends \advanced_testcase {

protected function setUp(): void {
$this->resetAfterTest();
Expand Down
2 changes: 1 addition & 1 deletion course/tests/content_item_readonly_repository_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2020 Jake Dallimore <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class content_item_readonly_repository_testcase extends \advanced_testcase {
class content_item_readonly_repository_test extends \advanced_testcase {
/**
* Test the repository method, find_all_for_course().
*/
Expand Down
2 changes: 1 addition & 1 deletion course/tests/content_item_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @copyright 2020 Jake Dallimore <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class content_item_testcase extends \advanced_testcase {
class content_item_test extends \advanced_testcase {

/**
* Test the content_item class.
Expand Down
2 changes: 1 addition & 1 deletion course/tests/course_image_cache_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @copyright 2021 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class course_image_cache_testcase extends \advanced_testcase {
class course_image_cache_test extends \advanced_testcase {

/**
* Initial setup.
Expand Down
2 changes: 1 addition & 1 deletion course/tests/course_summary_exporter_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @copyright 2021 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class course_summary_exporter_testcase extends \advanced_testcase {
class course_summary_exporter_test extends \advanced_testcase {

/**
* Test that if no course overview images uploaded get_course_image returns false.
Expand Down
2 changes: 1 addition & 1 deletion course/tests/exporters_content_item_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2020 Jake Dallimore <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class exporters_course_content_item_testcase extends \advanced_testcase {
class exporters_content_item_test extends \advanced_testcase {

/**
* Test confirming a content_item can be exported for a course.
Expand Down
2 changes: 1 addition & 1 deletion course/tests/exporters_content_items_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2020 Jake Dallimore <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class exporters_course_content_items_testcase extends \advanced_testcase {
class exporters_content_items_test extends \advanced_testcase {

/**
* Test confirming the collection of content_items can be exported for a course.
Expand Down
2 changes: 1 addition & 1 deletion course/tests/services_content_item_service_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2020 Jake Dallimore <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class services_content_item_service_testcase extends \advanced_testcase {
class services_content_item_service_test extends \advanced_testcase {

/**
* Test confirming that content items are returned by the service.
Expand Down
2 changes: 1 addition & 1 deletion dataformat/pdf/tests/writer_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @copyright 2020 Paul Holden <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class writer_testcase extends \advanced_testcase {
class writer_test extends \advanced_testcase {

/**
* Test writing data whose content contains an image with pluginfile.php source
Expand Down
2 changes: 1 addition & 1 deletion enrol/fee/tests/payment/service_provider_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @coversDefaultClass service_provider
*/
class service_provider_testcase extends \advanced_testcase {
class service_provider_test extends \advanced_testcase {

/**
* Test for service_provider::get_payable().
Expand Down
2 changes: 1 addition & 1 deletion enrol/meta/tests/external_add_instances_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @copyright 2021 WKS KV Bildung
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class add_instances_testcase extends \externallib_advanced_testcase {
class external_add_instances_test extends \externallib_advanced_testcase {

/**
* Test setup
Expand Down
2 changes: 1 addition & 1 deletion enrol/meta/tests/external_delete_instances_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @copyright 2021 WKS KV Bildung
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class delete_instances_testcase extends \externallib_advanced_testcase {
class external_delete_instances_test extends \externallib_advanced_testcase {

/**
* Test setup
Expand Down
2 changes: 1 addition & 1 deletion files/tests/archive_writer_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*
* @coversDefaultClass \core_files\archive_writer
*/
class archive_writer_testcase extends advanced_testcase {
class archive_writer_test extends advanced_testcase {

/**
* Test get_file_writer().
Expand Down
2 changes: 1 addition & 1 deletion files/tests/local/archive_writer/zip_writer_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* @coversDefaultClass \core_files\local\archive_writer\zip_writer
*/
class zip_writer_testcase extends advanced_testcase {
class zip_writer_test extends advanced_testcase {

/**
* Test add_file_from_filepath().
Expand Down
2 changes: 1 addition & 1 deletion grade/grading/form/guide/tests/generator_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class generator_testcase extends \advanced_testcase {
class generator_test extends \advanced_testcase {

/**
* Test guide creation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class fetch_test extends advanced_testcase {
class grades_grader_gradingpanel_guide_external_fetch_test extends advanced_testcase {

public static function setupBeforeClass(): void {
global $CFG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class store_test extends advanced_testcase {
class grades_grader_gradingpanel_guide_external_store_test extends advanced_testcase {

public static function setupBeforeClass(): void {
global $CFG;
Expand Down
2 changes: 1 addition & 1 deletion grade/grading/form/rubric/tests/generator_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class generator_testcase extends advanced_testcase {
class generator_test extends advanced_testcase {

/**
* Test rubric creation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @copyright 2019 Mathew May <mathew.solutions>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class fetch_test extends advanced_testcase {
class grades_grader_gradingpanel_rubric_external_fetch_test extends advanced_testcase {

public static function setupBeforeClass(): void {
global $CFG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @copyright 2019 Mathew May <mathew.solutions>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class store_test extends advanced_testcase {
class grades_grader_gradingpanel_rubric_external_store_test extends advanced_testcase {

public static function setupBeforeClass(): void {
global $CFG;
Expand Down
2 changes: 1 addition & 1 deletion grade/grading/form/rubric/tests/privacy_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @copyright 2018 Adrian Greeve <adriangreeve.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class privacy_testcase extends provider_testcase {
class privacy_test extends provider_testcase {

/**
* Test the export of rubric data.
Expand Down
2 changes: 1 addition & 1 deletion grade/grading/tests/generator_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class generator_testcase extends advanced_testcase {
class generator_test extends advanced_testcase {

/**
* Test gradingform controller creation.
Expand Down
2 changes: 1 addition & 1 deletion grade/tests/external/create_gradecategories_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 3.11
*/
class create_gradecategories_testcase extends \externallib_advanced_testcase {
class create_gradecategories_test extends \externallib_advanced_testcase {

/**
* Test create_gradecategories.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class fetch_test extends advanced_testcase {
class grades_grader_gradingpanel_point_external_fetch_test extends advanced_testcase {

public static function setupBeforeClass(): void {
global $CFG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class store_test extends advanced_testcase {
class grades_grader_gradingpanel_point_external_store_test extends advanced_testcase {

public static function setupBeforeClass(): void {
global $CFG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class fetch_test extends advanced_testcase {
class grades_grader_gradingpanel_scale_external_fetch_test extends advanced_testcase {

public static function setupBeforeClass(): void {
global $CFG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @copyright 2019 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class store_test extends advanced_testcase {
class grades_grader_gradingpanel_scale_external_store_test extends advanced_testcase {

public static function setupBeforeClass(): void {
global $CFG;
Expand Down
Loading

0 comments on commit deb0e76

Please sign in to comment.