forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-66902 tests: Fix all incorrect namespaces
This issue just goes over all the currently incorrect namespaces in test cases and: 1. Change the namespace to the correct one. 2. Move/rename it to correct location if needed (level 2 and down). 3. Remove not needed MOODLE_INTERNAL check when possible. 4. Remove file phpdoc when the file only has one class. 5. Make small adjustments in case the change of namespace requires it.
- Loading branch information
Showing
45 changed files
with
85 additions
and
232 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -14,24 +14,19 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Unit tests for the import_handler_info class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace tool_moodlenet\local\tests; | ||
namespace tool_moodlenet\local; | ||
|
||
use tool_moodlenet\local\import_handler_info; | ||
use tool_moodlenet\local\import_strategy; | ||
use tool_moodlenet\local\import_strategy_file; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* Class tool_moodlenet_import_handler_info_testcase, providing test cases for the import_handler_info class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class import_handler_info_test extends \advanced_testcase { | ||
|
||
|
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,15 +14,7 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Unit tests for the import_handler_registry class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace tool_moodlenet\local\tests; | ||
namespace tool_moodlenet\local; | ||
|
||
use tool_moodlenet\local\import_handler_registry; | ||
use tool_moodlenet\local\import_handler_info; | ||
|
@@ -31,10 +23,13 @@ | |
use tool_moodlenet\local\remote_resource; | ||
use tool_moodlenet\local\url; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* Class tool_moodlenet_import_handler_registry_testcase, providing test cases for the import_handler_registry class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class import_handler_registry_test extends \advanced_testcase { | ||
|
||
|
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,24 +14,19 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Unit tests for the import_info class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace tool_moodlenet\local\tests; | ||
namespace tool_moodlenet\local; | ||
|
||
use tool_moodlenet\local\import_info; | ||
use tool_moodlenet\local\remote_resource; | ||
use tool_moodlenet\local\url; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* Class tool_moodlenet_import_info_testcase, providing test cases for the import_info class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class import_info_test extends \advanced_testcase { | ||
|
||
|
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,15 +14,7 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Unit tests for the import_processor class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace tool_moodlenet\local\tests; | ||
namespace tool_moodlenet\local; | ||
|
||
use tool_moodlenet\local\import_handler_registry; | ||
use tool_moodlenet\local\import_processor; | ||
|
@@ -31,10 +23,13 @@ | |
use tool_moodlenet\local\remote_resource; | ||
use tool_moodlenet\local\url; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* Class tool_moodlenet_import_processor_testcase, providing test cases for the import_processor class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class import_processor_test extends \advanced_testcase { | ||
|
||
|
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,23 +14,18 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Unit tests for the remote_resource class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace tool_moodlenet\local\tests; | ||
namespace tool_moodlenet\local; | ||
|
||
use tool_moodlenet\local\remote_resource; | ||
use tool_moodlenet\local\url; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* Class tool_moodlenet_remote_resource_testcase, providing test cases for the remote_resource class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class remote_resource_test extends \advanced_testcase { | ||
|
||
|
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,23 +14,18 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
namespace tool_moodlenet\local; | ||
|
||
use tool_moodlenet\local\url; | ||
|
||
/** | ||
* Unit tests for the url class. | ||
* Class tool_moodlenet_url_testcase, providing test cases for the url class. | ||
* | ||
* @package tool_moodlenet | ||
* @category test | ||
* @copyright 2020 Jake Dallimore <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace tool_moodlenet\local\tests; | ||
|
||
use tool_moodlenet\local\url; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* Class tool_moodlenet_url_testcase, providing test cases for the url class. | ||
*/ | ||
class url_test extends \advanced_testcase { | ||
|
||
/** | ||
|
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -22,9 +22,7 @@ | |
* @copyright 2021 Tomo Tsuyuki <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace tests\core_course; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
namespace core_course; | ||
|
||
/** | ||
* Tests for the \core_course\task\course_delete_modules class. | ||
|
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
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 |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Unit tests for core_grades\component_gradeitems; | ||
* | ||
* @package gradingform_guide | ||
* @category test | ||
* @copyright 2019 Andrew Nicols <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License | ||
*/ | ||
|
||
declare(strict_types = 1); | ||
|
||
namespace gradingform_guide\grades\grader\gradingpanel\external; | ||
|
@@ -42,7 +33,7 @@ | |
* @copyright 2019 Andrew Nicols <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class grades_grader_gradingpanel_guide_external_fetch_test extends advanced_testcase { | ||
class fetch_test extends advanced_testcase { | ||
|
||
public static function setupBeforeClass(): void { | ||
global $CFG; | ||
|
Oops, something went wrong.