| Línea 47... |
Línea 47... |
| 47 |
* Test the report viewed event.
|
47 |
* Test the report viewed event.
|
| 48 |
*
|
48 |
*
|
| 49 |
* It's not possible to use the moodle API to simulate the viewing of log report, so here we
|
49 |
* It's not possible to use the moodle API to simulate the viewing of log report, so here we
|
| 50 |
* simply create the event and trigger it.
|
50 |
* simply create the event and trigger it.
|
| 51 |
*/
|
51 |
*/
|
| 52 |
public function test_report_viewed() {
|
52 |
public function test_report_viewed(): void {
|
| 53 |
$course = $this->getDataGenerator()->create_course();
|
53 |
$course = $this->getDataGenerator()->create_course();
|
| 54 |
$context = \context_course::instance($course->id);
|
54 |
$context = \context_course::instance($course->id);
|
| Línea 55... |
Línea 55... |
| 55 |
|
55 |
|
| 56 |
// Trigger event for log report viewed.
|
56 |
// Trigger event for log report viewed.
|
| Línea 75... |
Línea 75... |
| 75 |
* Test the user report viewed event.
|
75 |
* Test the user report viewed event.
|
| 76 |
*
|
76 |
*
|
| 77 |
* It's not possible to use the moodle API to simulate the viewing of user log report, so here we
|
77 |
* It's not possible to use the moodle API to simulate the viewing of user log report, so here we
|
| 78 |
* simply create the event and trigger it.
|
78 |
* simply create the event and trigger it.
|
| 79 |
*/
|
79 |
*/
|
| 80 |
public function test_user_report_viewed() {
|
80 |
public function test_user_report_viewed(): void {
|
| 81 |
$user = $this->getDataGenerator()->create_user();
|
81 |
$user = $this->getDataGenerator()->create_user();
|
| 82 |
$course = $this->getDataGenerator()->create_course();
|
82 |
$course = $this->getDataGenerator()->create_course();
|
| 83 |
$context = \context_course::instance($course->id);
|
83 |
$context = \context_course::instance($course->id);
|
| Línea 84... |
Línea 84... |
| 84 |
|
84 |
|