Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 49... Línea 49...
49
 
49
 
50
 
50
 
51
    /**
51
    /**
52
     * Ensure that export_user_preferences returns no data if the user has no data.
52
     * Ensure that export_user_preferences returns no data if the user has no data.
53
     */
53
     */
54
    public function test_export_user_preferences_not_defined() {
54
    public function test_export_user_preferences_not_defined(): void {
Línea 55... Línea 55...
55
        $user = \core_user::get_user_by_username('admin');
55
        $user = \core_user::get_user_by_username('admin');
56
        provider::export_user_preferences($user->id);
56
        provider::export_user_preferences($user->id);
Línea 61... Línea 61...
61
 
61
 
62
    /**
62
    /**
63
     * Ensure that export_user_preferences returns single preferences.
63
     * Ensure that export_user_preferences returns single preferences.
64
     * These preferences can be set on each course, but the value is shared in the whole site.
64
     * These preferences can be set on each course, but the value is shared in the whole site.
65
     */
65
     */
66
    public function test_export_user_preferences_single() {
66
    public function test_export_user_preferences_single(): void {
67
        // Create test user, add some preferences.
67
        // Create test user, add some preferences.
68
        $user = $this->getDataGenerator()->create_user();
68
        $user = $this->getDataGenerator()->create_user();
Línea 69... Línea 69...
69
        $this->setUser($user);
69
        $this->setUser($user);
Línea 87... Línea 87...
87
    }
87
    }
Línea 88... Línea 88...
88
 
88
 
89
    /**
89
    /**
90
     * Ensure that export_user_preferences returns preferences.
90
     * Ensure that export_user_preferences returns preferences.
91
     */
91
     */
92
    public function test_export_user_preferences_multiple() {
92
    public function test_export_user_preferences_multiple(): void {
93
        // Create a course and add a user preference.
93
        // Create a course and add a user preference.
94
        $user = $this->getDataGenerator()->create_user();
94
        $user = $this->getDataGenerator()->create_user();
95
        $this->setUser($user);
95
        $this->setUser($user);
96
        $course = $this->getDataGenerator()->create_course();
96
        $course = $this->getDataGenerator()->create_course();