Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 37... Línea 37...
37
    /**
37
    /**
38
     * Test that adding an unknown type causes the type to be added to the collection.
38
     * Test that adding an unknown type causes the type to be added to the collection.
39
     *
39
     *
40
     * @covers ::add_type
40
     * @covers ::add_type
41
     */
41
     */
42
    public function test_add_type_generic_type() {
42
    public function test_add_type_generic_type(): void {
43
        $collection = new collection('core_privacy');
43
        $collection = new collection('core_privacy');
Línea 44... Línea 44...
44
 
44
 
45
        // Mock a new types\type.
45
        // Mock a new types\type.
46
        $mockedtype = $this->createMock(types\type::class);
46
        $mockedtype = $this->createMock(types\type::class);
Línea 54... Línea 54...
54
    /**
54
    /**
55
     * Test that adding a known type works as anticipated.
55
     * Test that adding a known type works as anticipated.
56
     *
56
     *
57
     * @covers ::add_type
57
     * @covers ::add_type
58
     */
58
     */
59
    public function test_add_type_known_type() {
59
    public function test_add_type_known_type(): void {
60
        $collection = new collection('core_privacy');
60
        $collection = new collection('core_privacy');
Línea 61... Línea 61...
61
 
61
 
62
        $linked = new types\subsystem_link('example', [], 'langstring');
62
        $linked = new types\subsystem_link('example', [], 'langstring');
Línea 70... Línea 70...
70
    /**
70
    /**
71
     * Test that adding multiple types returns them all.
71
     * Test that adding multiple types returns them all.
72
     *
72
     *
73
     * @covers ::add_type
73
     * @covers ::add_type
74
     */
74
     */
75
    public function test_add_type_multiple() {
75
    public function test_add_type_multiple(): void {
76
        $collection = new collection('core_privacy');
76
        $collection = new collection('core_privacy');
Línea 77... Línea 77...
77
 
77
 
78
        $a = new types\subsystem_link('example', [], 'langstring');
78
        $a = new types\subsystem_link('example', [], 'langstring');
Línea 88... Línea 88...
88
    /**
88
    /**
89
     * Test that the add_database_table function adds a database table.
89
     * Test that the add_database_table function adds a database table.
90
     *
90
     *
91
     * @covers ::add_database_table
91
     * @covers ::add_database_table
92
     */
92
     */
93
    public function test_add_database_table() {
93
    public function test_add_database_table(): void {
94
        $collection = new collection('core_privacy');
94
        $collection = new collection('core_privacy');
Línea 95... Línea 95...
95
 
95
 
96
        $name = 'example';
96
        $name = 'example';
97
        $fields = ['field' => 'description'];
97
        $fields = ['field' => 'description'];
Línea 111... Línea 111...
111
    /**
111
    /**
112
     * Test that the add_user_preference function adds a single user preference.
112
     * Test that the add_user_preference function adds a single user preference.
113
     *
113
     *
114
     * @covers ::add_user_preference
114
     * @covers ::add_user_preference
115
     */
115
     */
116
    public function test_add_user_preference() {
116
    public function test_add_user_preference(): void {
117
        $collection = new collection('core_privacy');
117
        $collection = new collection('core_privacy');
Línea 118... Línea 118...
118
 
118
 
119
        $name = 'example';
119
        $name = 'example';
Línea 132... Línea 132...
132
    /**
132
    /**
133
     * Test that the link_external_location function links an external location.
133
     * Test that the link_external_location function links an external location.
134
     *
134
     *
135
     * @covers ::link_external_location
135
     * @covers ::link_external_location
136
     */
136
     */
137
    public function test_link_external_location() {
137
    public function test_link_external_location(): void {
138
        $collection = new collection('core_privacy');
138
        $collection = new collection('core_privacy');
Línea 139... Línea 139...
139
 
139
 
140
        $name = 'example';
140
        $name = 'example';
141
        $fields = ['field' => 'description'];
141
        $fields = ['field' => 'description'];
Línea 155... Línea 155...
155
    /**
155
    /**
156
     * Test that the link_subsystem function links the subsystem.
156
     * Test that the link_subsystem function links the subsystem.
157
     *
157
     *
158
     * @covers ::link_subsystem
158
     * @covers ::link_subsystem
159
     */
159
     */
160
    public function test_link_subsystem() {
160
    public function test_link_subsystem(): void {
161
        $collection = new collection('core_privacy');
161
        $collection = new collection('core_privacy');
Línea 162... Línea 162...
162
 
162
 
163
        $name = 'example';
163
        $name = 'example';
Línea 176... Línea 176...
176
    /**
176
    /**
177
     * Test that the link_plugintype function links the plugin.
177
     * Test that the link_plugintype function links the plugin.
178
     *
178
     *
179
     * @covers ::link_plugintype
179
     * @covers ::link_plugintype
180
     */
180
     */
181
    public function test_link_plugintype() {
181
    public function test_link_plugintype(): void {
182
        $collection = new collection('core_privacy');
182
        $collection = new collection('core_privacy');
Línea 183... Línea 183...
183
 
183
 
184
        $name = 'example';
184
        $name = 'example';
Línea 213... Línea 213...
213
     *
213
     *
214
     * @dataProvider component_list_provider
214
     * @dataProvider component_list_provider
215
     * @param   string  $component The component to test
215
     * @param   string  $component The component to test
216
     * @covers ::get_component
216
     * @covers ::get_component
217
     */
217
     */
218
    public function test_get_component($component) {
218
    public function test_get_component($component): void {
219
        $collection = new collection($component);
219
        $collection = new collection($component);
Línea 220... Línea 220...
220
 
220
 
221
        $this->assertEquals($component, $collection->get_component());
221
        $this->assertEquals($component, $collection->get_component());
222
    }
222
    }