Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec4c816
)
MDL-44279 user: added unit test to trigger known bug
author
Sam Hemelryk
<sam@moodle.com>
Wed, 19 Feb 2014 20:53:36 +0000
(09:53 +1300)
committer
Sam Hemelryk
<sam@moodle.com>
Thu, 20 Feb 2014 19:34:49 +0000
(08:34 +1300)
user/tests/externallib_test.php
patch
|
blob
|
blame
|
history
diff --git
a/user/tests/externallib_test.php
b/user/tests/externallib_test.php
index
9405a77
..
394af1c
100644
(file)
--- a/
user/tests/externallib_test.php
+++ b/
user/tests/externallib_test.php
@@
-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));
}
/**