Skip to content

Commit

Permalink
chore: namespace and backport fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhilton committed Oct 3, 2024
1 parent f520406 commit 6aad172
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
6 changes: 2 additions & 4 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,8 @@ function tool_objectfs_status_checks() {
];

if (get_config('tool_objectfs', 'proxyrangerequests')) {
return [
new tool_objectfs\check\proxy_range_request()
];
$checks[] = new tool_objectfs\check\proxy_range_request();
}

return [];
return $checks;
}
8 changes: 6 additions & 2 deletions tests/check/tagging_migration_status_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
use core\task\manager;
use tool_objectfs\check\tagging_migration_status;
use tool_objectfs\task\update_object_tags;
use tool_objectfs\tests\testcase;
use tool_objectfs\tests\tool_objectfs_testcase;

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

require_once(__DIR__ . '/../tool_objectfs_testcase.php');

/**
* Tagging migration status check tests
Expand All @@ -31,7 +35,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_objectfs\check\tagging_migration_status
*/
class tagging_migration_status_test extends testcase {
class tagging_migration_status_test extends tool_objectfs_testcase {
/**
* Tests scenario that returns N/A
*/
Expand Down
8 changes: 6 additions & 2 deletions tests/check/tagging_sync_status_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
use core\check\result;
use tool_objectfs\check\tagging_sync_status;
use tool_objectfs\local\tag\tag_manager;
use tool_objectfs\tests\testcase;
use tool_objectfs\tests\tool_objectfs_testcase;

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

require_once(__DIR__ . '/../tool_objectfs_testcase.php');

/**
* Tagging sync status check tests
Expand All @@ -30,7 +34,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_objectfs\check\tagging_sync_status
*/
class tagging_sync_status_test extends testcase {
class tagging_sync_status_test extends tool_objectfs_testcase {
/**
* Tests scenario that returns N/A
*/
Expand Down
8 changes: 6 additions & 2 deletions tests/tagging_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
use tool_objectfs\local\tag\environment_source;
use tool_objectfs\local\tag\tag_manager;
use tool_objectfs\local\tag\tag_source;
use tool_objectfs\tests\testcase;
use tool_objectfs\tests\tool_objectfs_testcase;

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

require_once(__DIR__ . '/tool_objectfs_testcase.php');

/**
* Tests tagging
Expand All @@ -33,7 +37,7 @@
* @copyright Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tagging_test extends testcase {
class tagging_test extends tool_objectfs_testcase {
/**
* Tests get_defined_tag_sources
* @covers \tool_objectfs\local\tag_manager::get_defined_tag_sources
Expand Down
8 changes: 6 additions & 2 deletions tests/task/update_object_tags_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
use core\task\manager;
use moodle_exception;
use tool_objectfs\local\tag\tag_manager;
use tool_objectfs\tests\testcase;
use tool_objectfs\tests\tool_objectfs_testcase;

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

require_once(__DIR__ . '/../tool_objectfs_testcase.php');

/**
* Tests update_object_tags
Expand All @@ -30,7 +34,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_objectfs\task\update_object_tags
*/
class update_object_tags_test extends testcase {
class update_object_tags_test extends tool_objectfs_testcase {
/**
* Creates object with tags needing to be synced
* @param string $contents contents of object to create.
Expand Down

0 comments on commit 6aad172

Please sign in to comment.