public function test_other_editing_caps() { $this->testpage->set_context(context_system::instance()); $this->setAdminUser(); // Exercise SUT. $this->testpage->set_other_editing_capability(array('moodle/course:manageactivities', 'moodle/site:other')); // Validated. $actualcaps = $this->testpage->all_editing_caps(); $expectedcaps = array('moodle/course:manageactivities', 'moodle/site:other', 'moodle/site:manageblocks'); $this->assertEquals(array_values($expectedcaps), array_values($actualcaps)); }