MDL-44279 user: added unit test to trigger known bug

This commit is contained in:
Sam Hemelryk 2014-02-20 09:53:36 +13:00
parent ec4c8161a4
commit 1d2fa3af5a

View File

@ -341,6 +341,16 @@ class core_user_externallib_testcase extends externallib_advanced_testcase {
// Only the own $USER username should be returned
$this->assertEquals(1, count($returnedusers));
// And finally test as one of the enrolled users.
$this->setUser($user1);
// Call the external function.
$returnedusers = core_user_external::get_users_by_field('username',
array($USER->username, $user1->username, $user2->username));
// Only the own $USER username should be returned still.
$this->assertEquals(1, count($returnedusers));
}
/**