Skip to content

Commit c7aac05

Browse files
authored
Merge pull request #466 from catalyst/fix-t19-tests
[T19] Fix t19 tests
2 parents 24e017b + 99b7f11 commit c7aac05

10 files changed

+7
-24
lines changed

factor/email/tests/factor_test.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
namespace factor_email\tests;
18-
1917
/**
2018
* Tests for TOTP factor.
2119
*
@@ -25,7 +23,7 @@
2523
* @copyright Catalyst IT
2624
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2725
*/
28-
class factor_test extends \advanced_testcase {
26+
class email_factor_test extends \core_phpunit\testcase {
2927

3028
/**
3129
* Provides to test_generate_email_ip_address_location test.

factor/grace/tests/factor_test.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
namespace factor_grace\tests;
18-
1917
/**
2018
* Tests for grace factor.
2119
*
@@ -24,7 +22,7 @@
2422
* @copyright Catalyst IT
2523
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2624
*/
27-
class factor_test extends \advanced_testcase {
25+
class grace_factor_test extends \core_phpunit\testcase {
2826

2927
public function test_affecting_factors() {
3028
$this->resetAfterTest(true);

factor/token/tests/factor_test.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
namespace factor_token\tests;
18-
1917
/**
2018
* Tests for MFA manager class.
2119
*
@@ -25,7 +23,7 @@
2523
* @copyright Catalyst IT
2624
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2725
*/
28-
class factor_test extends \advanced_testcase {
26+
class token_factor_test extends \core_phpunit\testcase {
2927

3028
public function setUp(): void {
3129
$this->resetAfterTest();

factor/totp/tests/factor_test.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
namespace factor_totp\tests;
18-
1917
defined('MOODLE_INTERNAL') || die();
2018

2119
require_once(__DIR__.'/../extlib/OTPHP/OTPInterface.php');
@@ -37,7 +35,7 @@
3735
* @copyright Catalyst IT
3836
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3937
*/
40-
class factor_test extends \advanced_testcase {
38+
class totp_factor_test extends \core_phpunit\testcase {
4139

4240
/**
4341
* Test code validation of the TOTP factor

tests/admin_setting_managemfa_test.php

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
namespace tool_mfa\tests;
18-
1917
defined('MOODLE_INTERNAL') || die();
2018

2119
require_once(__DIR__ . '/tool_mfa_testcase.php');

tests/manager_test.php

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
namespace tool_mfa\tests;
18-
1917
defined('MOODLE_INTERNAL') || die();
2018
require_once(__DIR__ . '/tool_mfa_testcase.php');
2119

tests/object_factor_base_test.php

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
//
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16-
namespace tool_mfa\tests;
1716

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

tests/plugininfo_factor_test.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @copyright Catalyst IT
2323
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2424
*/
25-
class plugininfo_factor_test extends advanced_testcase {
25+
class plugininfo_factor_test extends \core_phpunit\testcase {
2626

2727
public function test_get_next_user_factor() {
2828

tests/secret_manager_test.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
namespace tool_mfa\tests;
18-
1917
/**
2018
* Tests for MFA secret manager class.
2119
*
@@ -24,7 +22,7 @@
2422
* @copyright Catalyst IT
2523
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2624
*/
27-
class secret_manager_test extends \advanced_testcase {
25+
class secret_manager_test extends \core_phpunit\testcase {
2826

2927
public function test_create_secret() {
3028
global $DB;

tests/tool_mfa_testcase.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
namespace tool_mfa\tests;
18-
1917
defined('MOODLE_INTERNAL') || die();
2018

2119
global $CFG;
@@ -31,7 +29,7 @@
3129
* @copyright Catalyst IT
3230
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3331
*/
34-
abstract class tool_mfa_testcase extends \advanced_testcase {
32+
abstract class tool_mfa_testcase extends \core_phpunit\testcase {
3533

3634
/**
3735
* Sets the state of the factor, in particular the weight and whether it is enabled

0 commit comments

Comments
 (0)