mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 05:54:19 +02:00
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.
This commit is contained in:
parent
8f492a836a
commit
0ed53be9b2
@ -22,8 +22,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace tool_httpsreplace\tests;
|
||||
|
||||
namespace tool_httpsreplace;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
@ -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 <jrhdallimore@gmail.com>
|
||||
* @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 <jrhdallimore@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class import_handler_info_test extends \advanced_testcase {
|
||||
|
@ -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 <jrhdallimore@gmail.com>
|
||||
* @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\import_strategy_link;
|
||||
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 <jrhdallimore@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class import_handler_registry_test extends \advanced_testcase {
|
||||
|
@ -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 <jrhdallimore@gmail.com>
|
||||
* @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 <jrhdallimore@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class import_info_test extends \advanced_testcase {
|
||||
|
@ -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 <jrhdallimore@gmail.com>
|
||||
* @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\import_strategy_link;
|
||||
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 <jrhdallimore@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class import_processor_test extends \advanced_testcase {
|
||||
|
@ -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/>.
|
||||
|
||||
namespace tool_moodlenet\local;
|
||||
|
||||
use tool_moodlenet\local\remote_resource;
|
||||
use tool_moodlenet\local\url;
|
||||
|
||||
/**
|
||||
* Unit tests for the remote_resource class.
|
||||
* Class tool_moodlenet_remote_resource_testcase, providing test cases for the remote_resource class.
|
||||
*
|
||||
* @package tool_moodlenet
|
||||
* @category test
|
||||
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
namespace tool_moodlenet\local\tests;
|
||||
|
||||
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.
|
||||
*/
|
||||
class remote_resource_test extends \advanced_testcase {
|
||||
|
||||
/**
|
@ -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 <jrhdallimore@gmail.com>
|
||||
* @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 {
|
||||
|
||||
/**
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_accessreview\tests;
|
||||
namespace block_accessreview;
|
||||
|
||||
use ReflectionClass;
|
||||
use advanced_testcase;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_badges\tests;
|
||||
namespace block_badges;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_badges;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_blog_menu\tests;
|
||||
namespace block_blog_menu;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_blog_menu;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_blog_recent\tests;
|
||||
namespace block_blog_recent;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_blog_recent;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_blog_tags\tests;
|
||||
namespace block_blog_tags;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_blog_tags;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_comments\tests;
|
||||
namespace block_comments;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_comments;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_completionstatus\tests;
|
||||
namespace block_completionstatus;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_completionstatus;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_globalsearch\tests;
|
||||
namespace block_globalsearch;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_globalsearch;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_glossary_random\tests;
|
||||
namespace block_glossary_random;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_glossary_random;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_lp\tests;
|
||||
namespace block_lp;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_lp;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_mnet_hosts\tests;
|
||||
namespace block_mnet_hosts;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_mnet_hosts;
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace block_tags\tests;
|
||||
namespace block_tags;
|
||||
|
||||
use advanced_testcase;
|
||||
use block_tags;
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
namespace core_courseformat\output\local\state;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Tests for state classes (course, section, cm).
|
||||
*
|
||||
@ -37,6 +35,7 @@ class state_test extends \advanced_testcase {
|
||||
require_once($CFG->dirroot . '/course/lib.php');
|
||||
require_once($CFG->dirroot . '/course/format/tests/fixtures/format_theunittest.php');
|
||||
require_once($CFG->dirroot . '/course/format/tests/fixtures/format_theunittest_output_course_format_state.php');
|
||||
require_once($CFG->dirroot . '/lib/externallib.php');
|
||||
}
|
||||
|
||||
/**
|
@ -22,9 +22,7 @@
|
||||
* @copyright 2021 Tomo Tsuyuki <tomotsuyuki@catalyst-au.net>
|
||||
* @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.
|
||||
|
@ -14,7 +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/>.
|
||||
|
||||
namespace tests\core_course;
|
||||
namespace core_course;
|
||||
|
||||
/**
|
||||
* Contains tests for course related notifications.
|
||||
|
@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php');
|
||||
* @copyright 2021 WKS KV Bildung
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class external_add_instances_test extends \externallib_advanced_testcase {
|
||||
class add_instances_test extends \externallib_advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test setup
|
@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php');
|
||||
* @copyright 2021 WKS KV Bildung
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class external_delete_instances_test extends \externallib_advanced_testcase {
|
||||
class delete_instances_test extends \externallib_advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test setup
|
@ -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 <andrew@nicols.co.uk>
|
||||
* @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 @@ use moodle_exception;
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @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;
|
@ -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 <andrew@nicols.co.uk>
|
||||
* @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 @@ use moodle_exception;
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_grader_gradingpanel_guide_external_store_test extends advanced_testcase {
|
||||
class store_test extends advanced_testcase {
|
||||
|
||||
public static function setupBeforeClass(): void {
|
||||
global $CFG;
|
@ -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_rubric
|
||||
* @category test
|
||||
* @copyright 2019 Mathew May <mathew.solutions>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace gradingform_rubric\grades\grader\gradingpanel\external;
|
||||
@ -43,7 +34,7 @@ use moodle_exception;
|
||||
* @copyright 2019 Mathew May <mathew.solutions>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_grader_gradingpanel_rubric_external_fetch_test extends advanced_testcase {
|
||||
class fetch_test extends advanced_testcase {
|
||||
|
||||
public static function setupBeforeClass(): void {
|
||||
global $CFG;
|
@ -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_rubric
|
||||
* @category test
|
||||
* @copyright 2019 Mathew May <mathew.solutions>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace gradingform_rubric\grades\grader\gradingpanel\external;
|
||||
@ -42,7 +33,7 @@ use moodle_exception;
|
||||
* @copyright 2019 Mathew May <mathew.solutions>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_grader_gradingpanel_rubric_external_store_test extends advanced_testcase {
|
||||
class store_test extends advanced_testcase {
|
||||
|
||||
public static function setupBeforeClass(): void {
|
||||
global $CFG;
|
@ -25,7 +25,7 @@
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace tests\core_grades {
|
||||
namespace core_grades {
|
||||
|
||||
use advanced_testcase;
|
||||
use core_grades\component_gradeitems;
|
||||
|
@ -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 core_grades
|
||||
* @category test
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace core_grades\grades\grader\gradingpanel\point\external;
|
||||
@ -42,7 +33,7 @@ use moodle_exception;
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_grader_gradingpanel_point_external_fetch_test extends advanced_testcase {
|
||||
class fetch_test extends advanced_testcase {
|
||||
|
||||
public static function setupBeforeClass(): void {
|
||||
global $CFG;
|
@ -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 core_grades
|
||||
* @category test
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace core_grades\grades\grader\gradingpanel\point\external;
|
||||
@ -44,7 +35,7 @@ use grade_item;
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_grader_gradingpanel_point_external_store_test extends advanced_testcase {
|
||||
class store_test extends advanced_testcase {
|
||||
|
||||
public static function setupBeforeClass(): void {
|
||||
global $CFG;
|
@ -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 core_grades
|
||||
* @category test
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace core_grades\grades\grader\gradingpanel\scale\external;
|
||||
@ -42,7 +33,7 @@ use moodle_exception;
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_grader_gradingpanel_scale_external_fetch_test extends advanced_testcase {
|
||||
class fetch_test extends advanced_testcase {
|
||||
|
||||
public static function setupBeforeClass(): void {
|
||||
global $CFG;
|
@ -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 core_grades
|
||||
* @category test
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace core_grades\grades\grader\gradingpanel\scale\external;
|
||||
@ -44,7 +35,7 @@ use grade_item;
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_grader_gradingpanel_scale_external_store_test extends advanced_testcase {
|
||||
class store_test extends advanced_testcase {
|
||||
|
||||
public static function setupBeforeClass(): void {
|
||||
global $CFG;
|
@ -14,16 +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/>.
|
||||
|
||||
/**
|
||||
* Testing the H5P H5PFileStorage interface implementation.
|
||||
*
|
||||
* @package core_h5p
|
||||
* @category test
|
||||
* @copyright 2019 Victor Deniz <victor@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace core_h5p\local\tests;
|
||||
namespace core_h5p;
|
||||
|
||||
use core_h5p\file_storage;
|
||||
use core_h5p\local\library\autoloader;
|
||||
@ -38,11 +29,12 @@ use zip_archive;
|
||||
* Test class covering the H5PFileStorage interface implementation.
|
||||
*
|
||||
* @package core_h5p
|
||||
* @category test
|
||||
* @copyright 2019 Victor Deniz <victor@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class h5p_file_storage_test extends \advanced_testcase {
|
||||
class file_storage_test extends \advanced_testcase {
|
||||
|
||||
/** @var \core_h5p\file_storage H5P file storage instance */
|
||||
protected $h5p_file_storage;
|
@ -14,14 +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/>.
|
||||
|
||||
/**
|
||||
* Contains the class containing unit tests for the daily completion cron task.
|
||||
*
|
||||
* @package core
|
||||
* @copyright 2020 Jun Pataleta
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace core\task;
|
||||
|
||||
use advanced_testcase;
|
@ -14,26 +14,20 @@
|
||||
// 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\task;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
require_once(__DIR__ . '/../fixtures/task_fixtures.php');
|
||||
|
||||
/**
|
||||
* This file contains the unit tests for the task manager.
|
||||
*
|
||||
* @package core
|
||||
* @category test
|
||||
* @copyright 2019 Brendan Heywood <brendan@catalyst-au.net>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace core\task;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
require_once(__DIR__ . '/fixtures/task_fixtures.php');
|
||||
|
||||
/**
|
||||
* This file contains the unit tests for the task manager.
|
||||
*
|
||||
* @copyright 2019 Brendan Heywood <brendan@catalyst-au.net>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class task_manager_test extends \advanced_testcase {
|
||||
class manager_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Data provider for test_get_candidate_adhoc_tasks.
|
@ -14,28 +14,21 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* This file contains unit tests for the 'task running' data.
|
||||
*
|
||||
* @package core
|
||||
* @copyright 2019 The Open University
|
||||
* @copyright 2020 Mikhail Golenkov <golenkovm@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace core\task;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once(__DIR__ . '/fixtures/task_fixtures.php');
|
||||
require_once(__DIR__ . '/../fixtures/task_fixtures.php');
|
||||
|
||||
/**
|
||||
* This file contains unit tests for the 'task running' data.
|
||||
*
|
||||
* @package core
|
||||
* @category test
|
||||
* @copyright 2019 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class task_running_test extends \advanced_testcase {
|
||||
class running_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test for ad-hoc tasks.
|
@ -30,7 +30,9 @@ use mod_forum\local\entities\forum as forum_entity;
|
||||
use gradingform_controller;
|
||||
use mod_forum\grades\forum_gradeitem;
|
||||
|
||||
require_once(__DIR__ . '/generator_trait.php');
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once(__DIR__ . '/../generator_trait.php');
|
||||
|
||||
/**
|
||||
* Tests for the the Forum gradeitem.
|
||||
@ -39,7 +41,7 @@ require_once(__DIR__ . '/generator_trait.php');
|
||||
* @copyright Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_forum_gradeitem_test extends \advanced_testcase {
|
||||
class forum_gradeitem_test extends \advanced_testcase {
|
||||
use \mod_forum_tests_generator_trait;
|
||||
|
||||
/**
|
@ -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 mod_forum\grades\gradeitems.
|
||||
*
|
||||
* @package mod_forum
|
||||
* @category test
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace mod_forum\grade;
|
||||
@ -39,7 +30,7 @@ use coding_exception;
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class grades_gradeitems_test extends advanced_testcase {
|
||||
class gradeitems_test extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Ensure that the mappings are present and correct.
|
@ -28,7 +28,7 @@ use stdClass;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @coversDefaultClass \mod_forum\h5p\canedit
|
||||
*/
|
||||
class h5p_canedit_test extends \advanced_testcase {
|
||||
class canedit_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the behaviour of can_edit_content().
|
||||
@ -86,7 +86,7 @@ class h5p_canedit_test extends \advanced_testcase {
|
||||
|
||||
// Create the file.
|
||||
$filename = 'greeting-card-887.h5p';
|
||||
$path = __DIR__ . '/../../../h5p/tests/fixtures/' . $filename;
|
||||
$path = __DIR__ . '/../../../../h5p/tests/fixtures/' . $filename;
|
||||
if ($filecomponent === 'contentbank') {
|
||||
$generator = $this->getDataGenerator()->get_plugin_generator('core_contentbank');
|
||||
$contents = $generator->generate_contentbank_data(
|
||||
@ -114,7 +114,7 @@ class h5p_canedit_test extends \advanced_testcase {
|
||||
}
|
||||
|
||||
// Check if the currentuser can edit the file.
|
||||
$result = \mod_forum\h5p\canedit::can_edit_content($file);
|
||||
$result = canedit::can_edit_content($file);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
@ -32,22 +32,17 @@
|
||||
// of the Universitat Politecnica de Catalunya http://www.upc.edu
|
||||
// Contact info: Marc Alier Forment granludo @ gmail.com or marc.alier @ upc.edu.
|
||||
|
||||
namespace mod_lti\local\ltiopenid;
|
||||
|
||||
/**
|
||||
* This file contains unit tests for lti/openidregistrationlib.php
|
||||
* OpenId LTI Registration library tests
|
||||
*
|
||||
* @package mod_lti
|
||||
* @copyright 2020 Claude Vervoort, Cengage
|
||||
* @author Claude Vervoort
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
namespace mod_lti\local\ltiopenid;
|
||||
use mod_lti\local\ltiopenid\registration_exception;
|
||||
use mod_lti\local\ltiopenid\registration_helper;
|
||||
|
||||
/**
|
||||
* OpenId LTI Registration library tests
|
||||
*/
|
||||
class openidregistration_test extends \advanced_testcase {
|
||||
class registration_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* @var string A has-it-all client registration.
|
Loading…
x
Reference in New Issue
Block a user