mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-59748-master-2' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
455974b395
@ -1562,6 +1562,8 @@ class core_grouplib_testcase extends advanced_testcase {
|
||||
* Test groups_get_all_groups_for_courses() method.
|
||||
*/
|
||||
public function test_groups_get_all_groups_for_courses_with_courses() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
$generator = $this->getDataGenerator();
|
||||
|
||||
@ -1611,6 +1613,18 @@ class core_grouplib_testcase extends advanced_testcase {
|
||||
$generator->create_group_member(array('groupid' => $group9->id, 'userid' => $user1->id));
|
||||
$generator->create_group_member(array('groupid' => $group9->id, 'userid' => $user2->id));
|
||||
|
||||
// The process of modifying group members changes the timemodified of the group.
|
||||
// Refresh the group records.
|
||||
$group1 = $DB->get_record('groups', ['id' => $group1->id]);
|
||||
$group2 = $DB->get_record('groups', ['id' => $group2->id]);
|
||||
$group3 = $DB->get_record('groups', ['id' => $group3->id]);
|
||||
$group4 = $DB->get_record('groups', ['id' => $group4->id]);
|
||||
$group5 = $DB->get_record('groups', ['id' => $group5->id]);
|
||||
$group6 = $DB->get_record('groups', ['id' => $group6->id]);
|
||||
$group7 = $DB->get_record('groups', ['id' => $group7->id]);
|
||||
$group8 = $DB->get_record('groups', ['id' => $group8->id]);
|
||||
$group9 = $DB->get_record('groups', ['id' => $group9->id]);
|
||||
|
||||
$result = groups_get_all_groups_for_courses($courses);
|
||||
$assertpropertiesmatch = function($expected, $actual) {
|
||||
$props = get_object_vars($expected);
|
||||
|
Loading…
x
Reference in New Issue
Block a user