Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 32... Línea 32...
32
    public function setUp(): void {
32
    public function setUp(): void {
33
        $this->resetAfterTest();
33
        $this->resetAfterTest();
34
        $this->setAdminUser();
34
        $this->setAdminUser();
35
    }
35
    }
Línea 36... Línea 36...
36
 
36
 
37
    public function test_label_core_calendar_provide_event_action() {
37
    public function test_label_core_calendar_provide_event_action(): void {
38
        // Create the activity.
38
        // Create the activity.
39
        $course = $this->getDataGenerator()->create_course();
39
        $course = $this->getDataGenerator()->create_course();
Línea 40... Línea 40...
40
        $label = $this->getDataGenerator()->create_module('label', array('course' => $course->id));
40
        $label = $this->getDataGenerator()->create_module('label', array('course' => $course->id));
Línea 55... Línea 55...
55
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
55
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
56
        $this->assertEquals(1, $actionevent->get_item_count());
56
        $this->assertEquals(1, $actionevent->get_item_count());
57
        $this->assertTrue($actionevent->is_actionable());
57
        $this->assertTrue($actionevent->is_actionable());
58
    }
58
    }
Línea 59... Línea 59...
59
 
59
 
60
    public function test_label_core_calendar_provide_event_action_as_non_user() {
60
    public function test_label_core_calendar_provide_event_action_as_non_user(): void {
Línea 61... Línea 61...
61
        global $CFG;
61
        global $CFG;
62
 
62
 
63
        // Create the activity.
63
        // Create the activity.
Línea 80... Línea 80...
80
 
80
 
81
        // Confirm the event is not shown at all.
81
        // Confirm the event is not shown at all.
82
        $this->assertNull($actionevent);
82
        $this->assertNull($actionevent);
Línea 83... Línea 83...
83
    }
83
    }
84
 
84
 
85
    public function test_label_core_calendar_provide_event_action_in_hidden_section() {
85
    public function test_label_core_calendar_provide_event_action_in_hidden_section(): void {
86
        // Create the activity.
86
        // Create the activity.
Línea 87... Línea 87...
87
        $course = $this->getDataGenerator()->create_course();
87
        $course = $this->getDataGenerator()->create_course();
Línea 105... Línea 105...
105
 
105
 
106
        // Confirm the event is not shown at all.
106
        // Confirm the event is not shown at all.
107
        $this->assertNull($actionevent);
107
        $this->assertNull($actionevent);
Línea 108... Línea 108...
108
    }
108
    }
109
 
109
 
Línea 110... Línea 110...
110
    public function test_label_core_calendar_provide_event_action_for_user() {
110
    public function test_label_core_calendar_provide_event_action_for_user(): void {
111
        global $CFG;
111
        global $CFG;
112
 
112
 
Línea 137... Línea 137...
137
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
137
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
138
        $this->assertEquals(1, $actionevent->get_item_count());
138
        $this->assertEquals(1, $actionevent->get_item_count());
139
        $this->assertTrue($actionevent->is_actionable());
139
        $this->assertTrue($actionevent->is_actionable());
140
    }
140
    }
Línea 141... Línea 141...
141
 
141
 
142
    public function test_label_core_calendar_provide_event_action_already_completed() {
142
    public function test_label_core_calendar_provide_event_action_already_completed(): void {
Línea 143... Línea 143...
143
        global $CFG;
143
        global $CFG;
Línea 144... Línea 144...
144
 
144
 
Línea 168... Línea 168...
168
 
168
 
169
        // Ensure result was null.
169
        // Ensure result was null.
170
        $this->assertNull($actionevent);
170
        $this->assertNull($actionevent);
Línea 171... Línea 171...
171
    }
171
    }
172
 
172
 
Línea 173... Línea 173...
173
    public function test_label_core_calendar_provide_event_action_already_completed_for_user() {
173
    public function test_label_core_calendar_provide_event_action_already_completed_for_user(): void {
Línea 174... Línea 174...
174
        global $CFG;
174
        global $CFG;