Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 25... Línea 25...
25
 *
25
 *
26
 * @package    format_topics
26
 * @package    format_topics
27
 * @copyright  2022 Ferran Recio <ferran@moodle.com>
27
 * @copyright  2022 Ferran Recio <ferran@moodle.com>
28
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
29
 */
29
 */
30
class stateactions_test extends \advanced_testcase {
30
final class stateactions_test extends \advanced_testcase {
Línea 31... Línea 31...
31
 
31
 
32
    /**
32
    /**
33
     * Enrol a user into a course and login as this user.
33
     * Enrol a user into a course and login as this user.
34
     *
34
     *
Línea 189... Línea 189...
189
    /**
189
    /**
190
     * Data provider for basic role tests.
190
     * Data provider for basic role tests.
191
     *
191
     *
192
     * @return array the testing scenarios
192
     * @return array the testing scenarios
193
     */
193
     */
194
    public function basic_role_provider(): array {
194
    public static function basic_role_provider(): array {
195
        return [
195
        return [
196
            'admin' => [
196
            'admin' => [
197
                'role' => 'admin',
197
                'rolename' => 'admin',
198
                'expectedexception' => false,
198
                'expectedexception' => false,
199
            ],
199
            ],
200
            'editingteacher' => [
200
            'editingteacher' => [
201
                'role' => 'editingteacher',
201
                'rolename' => 'editingteacher',
202
                'expectedexception' => false,
202
                'expectedexception' => false,
203
            ],
203
            ],
204
            'teacher' => [
204
            'teacher' => [
205
                'role' => 'teacher',
205
                'rolename' => 'teacher',
206
                'expectedexception' => true,
206
                'expectedexception' => true,
207
            ],
207
            ],
208
            'student' => [
208
            'student' => [
209
                'role' => 'student',
209
                'rolename' => 'student',
210
                'expectedexception' => true,
210
                'expectedexception' => true,
211
            ],
211
            ],
212
            'guest' => [
212
            'guest' => [
213
                'role' => 'guest',
213
                'rolename' => 'guest',
214
                'expectedexception' => true,
214
                'expectedexception' => true,
215
            ],
215
            ],
216
            'unenroled' => [
216
            'unenroled' => [
217
                'role' => 'unenroled',
217
                'rolename' => 'unenroled',
218
                'expectedexception' => true,
218
                'expectedexception' => true,
219
            ],
219
            ],
220
        ];
220
        ];
221
    }
221
    }
222
}
222
}