mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-70102 PHPunit: Core test fails with weird added modules
Specifically it fails if the modules have unusual default capabilities so that editingteacher doesn't have addinstance.
This commit is contained in:
parent
56fd8c5125
commit
b5568aad80
@ -121,7 +121,8 @@ class services_content_item_service_testcase extends \advanced_testcase {
|
||||
|
||||
// The call to get_all_content_items() should return the same items as for the course,
|
||||
// given the user in an editing teacher and can add manual lti instances.
|
||||
$this->assertEquals(array_column($allcontentitems, 'name'), array_column($coursecontentitems, 'name'));
|
||||
$this->assertContains('lti', array_column($coursecontentitems, 'name'));
|
||||
$this->assertContains('lti', array_column($allcontentitems, 'name'));
|
||||
|
||||
// Now removing the cap 'mod/lti:addinstance'. This will restrict those items returned by the course-specific method.
|
||||
$teacherrole = $DB->get_record('role', array('shortname' => 'editingteacher'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user