Skip to content

Commit

Permalink
Merge branch 'MDL-66902' of https://github.com/stronk7/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 28, 2022
2 parents d7df338 + 0ed53be commit f680348
Show file tree
Hide file tree
Showing 45 changed files with 85 additions and 232 deletions.
File renamed without changes.
3 changes: 1 addition & 2 deletions admin/tool/httpsreplace/tests/httpsreplace_test.php
Expand Up @@ -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();

Expand Down
Expand Up @@ -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 {

Expand Down
Expand Up @@ -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;
Expand All @@ -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 <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_handler_registry_test extends \advanced_testcase {

Expand Down
Expand Up @@ -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 {

Expand Down
Expand Up @@ -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;
Expand All @@ -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 <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_processor_test extends \advanced_testcase {

Expand Down
Expand Up @@ -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 <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\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 <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class remote_resource_test extends \advanced_testcase {

Expand Down
Expand Up @@ -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 {

/**
Expand Down
2 changes: 1 addition & 1 deletion blocks/accessreview/tests/accessibility_review_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/badges/tests/badges_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/blog_menu/tests/blog_menu_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/blog_recent/tests/blog_recent_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/blog_tags/tests/blog_tags_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/comments/tests/comments_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/completionstatus/tests/completionstatus_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/globalsearch/tests/globalsearch_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/glossary_random/tests/glossary_random_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/lp/tests/lp_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/mnet_hosts/tests/mnet_hosts_test.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/tags/tests/tags_test.php
Expand Up @@ -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;
Expand Down
Expand Up @@ -16,8 +16,6 @@

namespace core_courseformat\output\local\state;

defined('MOODLE_INTERNAL') || die();

/**
* Tests for state classes (course, section, cm).
*
Expand All @@ -37,6 +35,7 @@ public static function setupBeforeClass(): void {
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');
}

/**
Expand Down
4 changes: 1 addition & 3 deletions course/tests/course_delete_modules_test.php
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion course/tests/notifications_test.php
Expand Up @@ -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.
Expand Down
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 external_add_instances_test extends \externallib_advanced_testcase {
class add_instances_test extends \externallib_advanced_testcase {

/**
* Test setup
Expand Down
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 external_delete_instances_test extends \externallib_advanced_testcase {
class delete_instances_test extends \externallib_advanced_testcase {

/**
* Test setup
Expand Down
Expand Up @@ -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;
Expand All @@ -42,7 +33,7 @@
* @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;
Expand Down

0 comments on commit f680348

Please sign in to comment.