Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 * Coursecompleted enrolment privacy tests.
19
 *
20
 * @package   enrol_coursecompleted
21
 * @copyright 2017 eWallah (www.eWallah.net)
22
 * @author    Renaat Debleu <info@eWallah.net>
23
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 */
25
namespace enrol_coursecompleted\privacy;
26
 
27
use core_privacy\tests\provider_testcase;
28
 
29
/**
30
 * Coursecompleted enrolment privacy tests.
31
 *
32
 * @package   enrol_coursecompleted
33
 * @copyright 2017 eWallah (www.eWallah.net)
34
 * @author    Renaat Debleu <info@eWallah.net>
35
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
36
 * @coversDefaultClass \enrol_coursecompleted\privacy\provider
37
 */
38
final class privacy_test extends provider_testcase {
39
    /**
40
     * Test returning metadata.
41
     * @covers \enrol_coursecompleted\privacy\provider
42
     */
43
    public function test_get_metadata(): void {
44
        $this->resetAfterTest(true);
45
        $collection = new \core_privacy\local\metadata\collection('enrol_coursecompleted');
46
        $reason = \enrol_coursecompleted\privacy\provider::get_reason($collection);
47
        $this->assertEquals($reason, 'privacy:metadata');
48
        $this->assertStringContainsString('does not store', get_string($reason, 'enrol_coursecompleted'));
49
    }
50
}