Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 39... Línea 39...
39
    }
39
    }
Línea 40... Línea 40...
40
 
40
 
41
    /**
41
    /**
42
     * Test the rule created event.
42
     * Test the rule created event.
43
     */
43
     */
44
    public function test_rule_created() {
44
    public function test_rule_created(): void {
45
        // Create the items we need to create a rule.
45
        // Create the items we need to create a rule.
46
        $course = $this->getDataGenerator()->create_course();
46
        $course = $this->getDataGenerator()->create_course();
Línea 47... Línea 47...
47
        $user = $this->getDataGenerator()->create_user();
47
        $user = $this->getDataGenerator()->create_user();
Línea 88... Línea 88...
88
    }
88
    }
Línea 89... Línea 89...
89
 
89
 
90
    /**
90
    /**
91
     * Test the rule updated event.
91
     * Test the rule updated event.
92
     */
92
     */
93
    public function test_rule_updated() {
93
    public function test_rule_updated(): void {
94
        // Create the items we need.
94
        // Create the items we need.
95
        $monitorgenerator = $this->getDataGenerator()->get_plugin_generator('tool_monitor');
95
        $monitorgenerator = $this->getDataGenerator()->get_plugin_generator('tool_monitor');
Línea 96... Línea 96...
96
        $course = $this->getDataGenerator()->create_course();
96
        $course = $this->getDataGenerator()->create_course();
Línea 134... Línea 134...
134
    }
134
    }
Línea 135... Línea 135...
135
 
135
 
136
    /**
136
    /**
137
     * Test the rule deleted event.
137
     * Test the rule deleted event.
138
     */
138
     */
139
    public function test_rule_deleted() {
139
    public function test_rule_deleted(): void {
140
        // Create the items we need.
140
        // Create the items we need.
141
        $monitorgenerator = $this->getDataGenerator()->get_plugin_generator('tool_monitor');
141
        $monitorgenerator = $this->getDataGenerator()->get_plugin_generator('tool_monitor');
Línea 142... Línea 142...
142
        $course = $this->getDataGenerator()->create_course();
142
        $course = $this->getDataGenerator()->create_course();
Línea 177... Línea 177...
177
    }
177
    }
Línea 178... Línea 178...
178
 
178
 
179
    /**
179
    /**
180
     * Test the subscription created event.
180
     * Test the subscription created event.
181
     */
181
     */
182
    public function test_subscription_created() {
182
    public function test_subscription_created(): void {
183
        // Create the items we need to test this.
183
        // Create the items we need to test this.
184
        $user = $this->getDataGenerator()->create_user();
184
        $user = $this->getDataGenerator()->create_user();
185
        $course = $this->getDataGenerator()->create_course();
185
        $course = $this->getDataGenerator()->create_course();
Línea 214... Línea 214...
214
    }
214
    }
Línea 215... Línea 215...
215
 
215
 
216
    /**
216
    /**
217
     * Test the subscription deleted event.
217
     * Test the subscription deleted event.
218
     */
218
     */
219
    public function test_subscription_deleted() {
219
    public function test_subscription_deleted(): void {
220
        // Create the items we need to test this.
220
        // Create the items we need to test this.
221
        $user = $this->getDataGenerator()->create_user();
221
        $user = $this->getDataGenerator()->create_user();
222
        $course = $this->getDataGenerator()->create_course();
222
        $course = $this->getDataGenerator()->create_course();
Línea 297... Línea 297...
297
    }
297
    }
Línea 298... Línea 298...
298
 
298
 
299
    /**
299
    /**
300
     * Test the subscription criteria met event.
300
     * Test the subscription criteria met event.
301
     */
301
     */
302
    public function test_subscription_criteria_met() {
302
    public function test_subscription_criteria_met(): void {
303
        // Create the items we need to test this.
303
        // Create the items we need to test this.
304
        $user = $this->getDataGenerator()->create_user();
304
        $user = $this->getDataGenerator()->create_user();
305
        $course = $this->getDataGenerator()->create_course();
305
        $course = $this->getDataGenerator()->create_course();
306
        $book = $this->getDataGenerator()->create_module('book', array('course' => $course->id));
306
        $book = $this->getDataGenerator()->create_module('book', array('course' => $course->id));