| Línea 35... |
Línea 35... |
| 35 |
* @package core_reportbuilder
|
35 |
* @package core_reportbuilder
|
| 36 |
* @covers \core_reportbuilder\task\send_schedule
|
36 |
* @covers \core_reportbuilder\task\send_schedule
|
| 37 |
* @copyright 2021 Paul Holden <paulh@moodle.com>
|
37 |
* @copyright 2021 Paul Holden <paulh@moodle.com>
|
| 38 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
38 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
| 39 |
*/
|
39 |
*/
|
| 40 |
class send_schedule_test extends advanced_testcase {
|
40 |
final class send_schedule_test extends advanced_testcase {
|
| Línea 41... |
Línea 41... |
| 41 |
|
41 |
|
| 42 |
/**
|
42 |
/**
|
| 43 |
* Data provider for {@see test_execute_viewas_user}
|
43 |
* Data provider for {@see test_execute_viewas_user}
|
| 44 |
*
|
44 |
*
|
| 45 |
* @return array[]
|
45 |
* @return array[]
|
| 46 |
*/
|
46 |
*/
|
| 47 |
public function execute_report_viewas_user_provider(): array {
|
47 |
public static function execute_report_viewas_user_provider(): array {
|
| 48 |
return [
|
48 |
return [
|
| 49 |
'View report as schedule creator' => [schedule::REPORT_VIEWAS_CREATOR, null, 'admin', 'admin'],
|
49 |
'View report as schedule creator' => [schedule::REPORT_VIEWAS_CREATOR, null, 'admin', 'admin'],
|
| 50 |
'View report as schedule recipient' => [schedule::REPORT_VIEWAS_RECIPIENT, null, 'userone', 'usertwo'],
|
50 |
'View report as schedule recipient' => [schedule::REPORT_VIEWAS_RECIPIENT, null, 'userone', 'usertwo'],
|
| 51 |
'View report as specific user' => [null, 'userone', 'userone', 'userone'],
|
51 |
'View report as specific user' => [null, 'userone', 'userone', 'userone'],
|