Merge branch 'MDL-56407-master-2' of git://github.com/junpataleta/moodle

This commit is contained in:
Andrew Nicols 2016-11-22 09:06:09 +08:00
commit d10ca75b8c
6 changed files with 62 additions and 16 deletions

View file

@ -839,13 +839,13 @@ class core_message_api_testcase extends core_message_messagelib_testcase {
$this->setUser($user1);
// User shouldn't be blocked.
$this->assertFalse(\core_message\api::is_user_blocked($user1, $user2));
$this->assertFalse(\core_message\api::is_user_blocked($user1->id, $user2->id));
// Block the user.
message_block_contact($user2->id);
// User should be blocked.
$this->assertTrue(\core_message\api::is_user_blocked($user1, $user2));
$this->assertTrue(\core_message\api::is_user_blocked($user1->id, $user2->id));
}
/**
@ -865,7 +865,7 @@ class core_message_api_testcase extends core_message_messagelib_testcase {
$this->setAdminUser();
// As the admin you should still be able to send messages to the user.
$this->assertFalse(\core_message\api::is_user_blocked($user1));
$this->assertFalse(\core_message\api::is_user_blocked($user1->id));
}
/*