Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 26... Línea 26...
26
 */
26
 */
27
class capabilities_test extends \advanced_testcase {
27
class capabilities_test extends \advanced_testcase {
28
    /**
28
    /**
29
     * A user who does not have capabilities to add events to the calendar should be able to create activities.
29
     * A user who does not have capabilities to add events to the calendar should be able to create activities.
30
     */
30
     */
31
    public function test_creation_with_no_calendar_capabilities() {
31
    public function test_creation_with_no_calendar_capabilities(): void {
32
        $this->resetAfterTest();
32
        $this->resetAfterTest();
33
        $course = self::getDataGenerator()->create_course(['enablecompletion' => 1]);
33
        $course = self::getDataGenerator()->create_course(['enablecompletion' => 1]);
34
        $context = \context_course::instance($course->id);
34
        $context = \context_course::instance($course->id);
35
        $user = self::getDataGenerator()->create_and_enrol($course, 'editingteacher');
35
        $user = self::getDataGenerator()->create_and_enrol($course, 'editingteacher');
36
        $roleid = self::getDataGenerator()->create_role();
36
        $roleid = self::getDataGenerator()->create_role();