Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 31... Línea 31...
31
 * Unit tests for the block_myoverview implementation of the privacy API.
31
 * Unit tests for the block_myoverview implementation of the privacy API.
32
 *
32
 *
33
 * @copyright  2018 Peter Dias <peter@moodle.com>
33
 * @copyright  2018 Peter Dias <peter@moodle.com>
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35
 */
35
 */
36
class provider_test extends \core_privacy\tests\provider_testcase {
36
final class provider_test extends \core_privacy\tests\provider_testcase {
37
    /**
37
    /**
38
     * Ensure that export_user_preferences returns no data if the user has not visited the myoverview block.
38
     * Ensure that export_user_preferences returns no data if the user has not visited the myoverview block.
39
     */
39
     */
40
    public function test_export_user_preferences_no_pref(): void {
40
    public function test_export_user_preferences_no_pref(): void {
41
        $this->resetAfterTest();
41
        $this->resetAfterTest();
Línea 69... Línea 69...
69
    /**
69
    /**
70
     * Create an array of valid user preferences for the myoverview block.
70
     * Create an array of valid user preferences for the myoverview block.
71
     *
71
     *
72
     * @return array Array of valid user preferences.
72
     * @return array Array of valid user preferences.
73
     */
73
     */
74
    public function user_preference_provider() {
74
    public static function user_preference_provider(): array {
75
        return array(
75
        return array(
76
            array('block_myoverview_user_sort_preference', 'lastaccessed', ''),
76
            array('block_myoverview_user_sort_preference', 'lastaccessed', ''),
77
            array('block_myoverview_user_sort_preference', 'title', ''),
77
            array('block_myoverview_user_sort_preference', 'title', ''),
78
            array('block_myoverview_user_sort_preference', 'shortname', ''),
78
            array('block_myoverview_user_sort_preference', 'shortname', ''),
79
            array('block_myoverview_user_grouping_preference', 'allincludinghidden', ''),
79
            array('block_myoverview_user_grouping_preference', 'allincludinghidden', ''),