MDL-37164 message - fix broken unit tests

We have fixed the returning of the guest user now
This commit is contained in:
Dan Poltawski
2013-02-05 14:27:20 +08:00
parent 4c5dc0e367
commit 61a73b43c1
+2 -3
View File
@@ -351,12 +351,11 @@ class core_message_external_testcase extends externallib_advanced_testcase {
$user5 = self::getDataGenerator()->create_user($user5);
self::getDataGenerator()->enrol_user($user5->id, $course2->id);
// Searching for users, keep in mind that 'Admin User' and 'Guest user' can be returned for now.
// See MDL-37164 which should fix that. Once fixed, remove the +2's.
$this->setUser($user1);
$results = core_message_external::search_contacts('r');
$results = external_api::clean_returnvalue(core_message_external::search_contacts_returns(), $results);
$this->assertCount(4 + 2, $results);
// Should return the 4 users created above with the letter 'r' in name and the admin [admin useR].
$this->assertCount(4 + 1, $results);
$results = core_message_external::search_contacts('r', true);
$results = external_api::clean_returnvalue(core_message_external::search_contacts_returns(), $results);
$this->assertCount(2, $results);