Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 45... Línea 45...
45
    }
45
    }
Línea 46... Línea 46...
46
 
46
 
47
    /**
47
    /**
48
     * Ensure that export_user_preferences returns no data if the user has no data.
48
     * Ensure that export_user_preferences returns no data if the user has no data.
49
     */
49
     */
50
    public function test_export_user_preferences_not_defined() {
50
    public function test_export_user_preferences_not_defined(): void {
51
        $user = \core_user::get_user_by_username('admin');
51
        $user = \core_user::get_user_by_username('admin');
Línea 52... Línea 52...
52
        provider::export_user_preferences($user->id);
52
        provider::export_user_preferences($user->id);
53
 
53
 
54
        $writer = writer::with_context(\context_system::instance());
54
        $writer = writer::with_context(\context_system::instance());
Línea 55... Línea 55...
55
        $this->assertFalse($writer->has_any_data());
55
        $this->assertFalse($writer->has_any_data());
56
    }
56
    }
57
 
57
 
58
    /**
58
    /**
59
     * Ensure that export_user_preferences returns single preferences.
59
     * Ensure that export_user_preferences returns single preferences.
60
     */
60
     */
61
    public function test_export_user_preferences_single() {
61
    public function test_export_user_preferences_single(): void {
62
        // Define a user preference.
62
        // Define a user preference.
63
        $user = $this->getDataGenerator()->create_user();
63
        $user = $this->getDataGenerator()->create_user();