| Línea 33... |
Línea 33... |
| 33 |
* Unit tests for the block_timeline implementation of the privacy API.
|
33 |
* Unit tests for the block_timeline implementation of the privacy API.
|
| 34 |
*
|
34 |
*
|
| 35 |
* @copyright 2018 Peter Dias <peter@moodle.com>
|
35 |
* @copyright 2018 Peter Dias <peter@moodle.com>
|
| 36 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
36 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
| 37 |
*/
|
37 |
*/
|
| 38 |
class provider_test extends \core_privacy\tests\provider_testcase {
|
38 |
final class provider_test extends \core_privacy\tests\provider_testcase {
|
| Línea 39... |
Línea 39... |
| 39 |
|
39 |
|
| 40 |
/**
|
40 |
/**
|
| 41 |
* Ensure that export_user_preferences returns no data if the user has not visited the myoverview block.
|
41 |
* Ensure that export_user_preferences returns no data if the user has not visited the myoverview block.
|
| 42 |
*/
|
42 |
*/
|
| Línea 74... |
Línea 74... |
| 74 |
/**
|
74 |
/**
|
| 75 |
* Create an array of valid user preferences for the timeline block.
|
75 |
* Create an array of valid user preferences for the timeline block.
|
| 76 |
*
|
76 |
*
|
| 77 |
* @return array Array of valid user preferences.
|
77 |
* @return array Array of valid user preferences.
|
| 78 |
*/
|
78 |
*/
|
| 79 |
public function user_preference_provider() {
|
79 |
public static function user_preference_provider(): array {
|
| 80 |
return array(
|
80 |
return array(
|
| 81 |
array('block_timeline_user_sort_preference', 'sortbydates', ''),
|
81 |
array('block_timeline_user_sort_preference', 'sortbydates', ''),
|
| 82 |
array('block_timeline_user_sort_preference', 'sortbycourses', ''),
|
82 |
array('block_timeline_user_sort_preference', 'sortbycourses', ''),
|
| 83 |
array('block_timeline_user_sort_preference', 'next7days', ''),
|
83 |
array('block_timeline_user_sort_preference', 'next7days', ''),
|
| 84 |
array('block_timeline_user_sort_preference', 'all', ''),
|
84 |
array('block_timeline_user_sort_preference', 'all', ''),
|