Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 28... Línea 28...
28
 */
28
 */
29
class legacy_polyfill_test extends \advanced_testcase {
29
class legacy_polyfill_test extends \advanced_testcase {
30
    /**
30
    /**
31
     * Test that the core_plagiarism\privacy\legacy_polyfill works and that the static _export_plagiarism_user_data can be called.
31
     * Test that the core_plagiarism\privacy\legacy_polyfill works and that the static _export_plagiarism_user_data can be called.
32
     */
32
     */
33
    public function test_export_plagiarism_user_data() {
33
    public function test_export_plagiarism_user_data(): void {
34
        $userid = 476;
34
        $userid = 476;
35
        $context = \context_system::instance();
35
        $context = \context_system::instance();
Línea 36... Línea 36...
36
 
36
 
37
        $mock = $this->createMock(test_plagiarism_legacy_polyfill_mock_wrapper::class);
37
        $mock = $this->createMock(test_plagiarism_legacy_polyfill_mock_wrapper::class);
Línea 44... Línea 44...
44
    }
44
    }
Línea 45... Línea 45...
45
 
45
 
46
    /**
46
    /**
47
     * Test for _get_metadata shim.
47
     * Test for _get_metadata shim.
48
     */
48
     */
49
    public function test_get_metadata() {
49
    public function test_get_metadata(): void {
50
        $collection = new \core_privacy\local\metadata\collection('core_plagiarism');
50
        $collection = new \core_privacy\local\metadata\collection('core_plagiarism');
51
        $this->assertSame($collection, test_legacy_polyfill_plagiarism_provider::get_metadata($collection));
51
        $this->assertSame($collection, test_legacy_polyfill_plagiarism_provider::get_metadata($collection));
Línea 52... Línea 52...
52
    }
52
    }
53
 
53
 
54
    /**
54
    /**
55
     * Test the _delete_plagiarism_for_context shim.
55
     * Test the _delete_plagiarism_for_context shim.
56
     */
56
     */
Línea 57... Línea 57...
57
    public function test_delete_plagiarism_for_context() {
57
    public function test_delete_plagiarism_for_context(): void {
58
        $context = \context_system::instance();
58
        $context = \context_system::instance();
59
 
59
 
Línea 67... Línea 67...
67
    }
67
    }
Línea 68... Línea 68...
68
 
68
 
69
    /**
69
    /**
70
     * Test the _delete_plagiarism_for_context shim.
70
     * Test the _delete_plagiarism_for_context shim.
71
     */
71
     */
72
    public function test_delete_plagiarism_for_user() {
72
    public function test_delete_plagiarism_for_user(): void {
73
        $userid = 696;
73
        $userid = 696;
Línea 74... Línea 74...
74
        $context = \context_system::instance();
74
        $context = \context_system::instance();
75
 
75