Merge branch 'master-MDL-72210' of https://github.com/golenkovm/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2021-08-18 19:54:39 +02:00 committed by Ilya Tregubov
commit 39d9c8fdd4

View File

@ -33,8 +33,7 @@ class message_airnotifier_manager_testcase extends advanced_testcase {
// Mock server responses.
$CFG->airnotifierurl = 'localhost';
curl::mock_response(json_encode(['status' => 'ok'])); // Mock first request to check URL.
curl::mock_response(json_encode(['error' => 'Invalid access key'])); // Mock second request to check acces key.
curl::mock_response(json_encode(['error' => 'Invalid access key'])); // Mock request to check access key.
$checks = $manager->check_configuration();
$this->assertEquals(core\check\result::OK, $checks[0]->get_status()); // Mobile service enabled.
@ -103,7 +102,6 @@ class message_airnotifier_manager_testcase extends advanced_testcase {
$manager = new message_airnotifier_manager();
// No devices yet for current user.
curl::mock_response(json_encode(['status' => 'ok']));
$this->assertFalse($manager->has_enabled_devices($CFG->airnotifiermobileappname));
// Add devices.