Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 79... Línea 79...
79
     * @param   string  $filename    The filename given
79
     * @param   string  $filename    The filename given
80
     * @param   string   $expected   The extension of the file
80
     * @param   string   $expected   The extension of the file
81
     *
81
     *
82
     * @covers ::get_extension
82
     * @covers ::get_extension
83
     */
83
     */
84
    public function test_get_extension(string $filename, string $expected) {
84
    public function test_get_extension(string $filename, string $expected): void {
85
        $this->resetAfterTest();
85
        $this->resetAfterTest();
Línea 86... Línea 86...
86
 
86
 
Línea 87... Línea 87...
87
        $cb = new contentbank();
87
        $cb = new contentbank();
Línea 110... Línea 110...
110
     * @param   string  $extension    The extension of the file given
110
     * @param   string  $extension    The extension of the file given
111
     * @param   string  $expected   The supporter contenttype of the file
111
     * @param   string  $expected   The supporter contenttype of the file
112
     *
112
     *
113
     * @covers ::load_context_supported_extensions
113
     * @covers ::load_context_supported_extensions
114
     */
114
     */
115
    public function test_get_extension_supporter_for_admins(array $supporters, string $extension, string $expected) {
115
    public function test_get_extension_supporter_for_admins(array $supporters, string $extension, string $expected): void {
116
        $this->resetAfterTest();
116
        $this->resetAfterTest();
Línea 117... Línea 117...
117
 
117
 
Línea 118... Línea 118...
118
        $cb = new contentbank();
118
        $cb = new contentbank();
Línea 134... Línea 134...
134
     * @param   string  $extension    The extension of the file given
134
     * @param   string  $extension    The extension of the file given
135
     * @param   string  $expected   The supporter contenttype of the file
135
     * @param   string  $expected   The supporter contenttype of the file
136
     *
136
     *
137
     * @covers ::load_context_supported_extensions
137
     * @covers ::load_context_supported_extensions
138
     */
138
     */
139
    public function test_get_extension_supporter_for_users(array $supporters, string $extension, string $expected) {
139
    public function test_get_extension_supporter_for_users(array $supporters, string $extension, string $expected): void {
140
        $this->resetAfterTest();
140
        $this->resetAfterTest();
Línea 141... Línea 141...
141
 
141
 
142
        $cb = new contentbank();
142
        $cb = new contentbank();
Línea 159... Línea 159...
159
     * @param   string  $extension    The extension of the file given
159
     * @param   string  $extension    The extension of the file given
160
     * @param   string  $expected   The supporter contenttype of the file
160
     * @param   string  $expected   The supporter contenttype of the file
161
     *
161
     *
162
     * @covers ::load_context_supported_extensions
162
     * @covers ::load_context_supported_extensions
163
     */
163
     */
164
    public function test_get_extension_supporter_for_teachers(array $supporters, string $extension, string $expected) {
164
    public function test_get_extension_supporter_for_teachers(array $supporters, string $extension, string $expected): void {
165
        $this->resetAfterTest();
165
        $this->resetAfterTest();
Línea 166... Línea 166...
166
 
166
 
Línea 167... Línea 167...
167
        $cb = new contentbank();
167
        $cb = new contentbank();
Línea 185... Línea 185...
185
     * @param   string  $extension    The extension of the file given
185
     * @param   string  $extension    The extension of the file given
186
     * @param   string  $expected   The supporter contenttype of the file
186
     * @param   string  $expected   The supporter contenttype of the file
187
     *
187
     *
188
     * @covers ::get_extension_supporter
188
     * @covers ::get_extension_supporter
189
     */
189
     */
190
    public function test_get_extension_supporter(array $supporters, string $extension, string $expected) {
190
    public function test_get_extension_supporter(array $supporters, string $extension, string $expected): void {
191
        $this->resetAfterTest();
191
        $this->resetAfterTest();
Línea 192... Línea 192...
192
 
192
 
193
        $cb = new contentbank();
193
        $cb = new contentbank();
194
        $systemcontext = context_system::instance();
194
        $systemcontext = context_system::instance();
Línea 359... Línea 359...
359
    /**
359
    /**
360
     * Test create_content_from_file function.
360
     * Test create_content_from_file function.
361
     *
361
     *
362
     * @covers ::create_content_from_file
362
     * @covers ::create_content_from_file
363
     */
363
     */
364
    public function test_create_content_from_file() {
364
    public function test_create_content_from_file(): void {
365
        global $USER, $CFG;
365
        global $USER, $CFG;
Línea 366... Línea 366...
366
 
366
 
367
        $this->resetAfterTest();
367
        $this->resetAfterTest();
368
        $this->setAdminUser();
368
        $this->setAdminUser();
Línea 393... Línea 393...
393
    /**
393
    /**
394
     * Test the behaviour of delete_contents().
394
     * Test the behaviour of delete_contents().
395
     *
395
     *
396
     * @covers  ::delete_contents
396
     * @covers  ::delete_contents
397
     */
397
     */
398
    public function test_delete_contents() {
398
    public function test_delete_contents(): void {
399
        global $DB;
399
        global $DB;
Línea 400... Línea 400...
400
 
400
 
401
        $this->resetAfterTest();
401
        $this->resetAfterTest();
Línea 442... Línea 442...
442
    /**
442
    /**
443
     * Test the behaviour of delete_contents() for empty content bank.
443
     * Test the behaviour of delete_contents() for empty content bank.
444
     *
444
     *
445
     * @covers  ::delete_contents
445
     * @covers  ::delete_contents
446
     */
446
     */
447
    public function test_delete_contents_for_empty_contentbank() {
447
    public function test_delete_contents_for_empty_contentbank(): void {
Línea 448... Línea 448...
448
 
448
 
449
        $this->resetAfterTest();
449
        $this->resetAfterTest();
Línea 450... Línea 450...
450
        $cb = new \core_contentbank\contentbank();
450
        $cb = new \core_contentbank\contentbank();
Línea 465... Línea 465...
465
    /**
465
    /**
466
     * Test the behaviour of move_contents().
466
     * Test the behaviour of move_contents().
467
     *
467
     *
468
     * @covers  ::move_contents
468
     * @covers  ::move_contents
469
     */
469
     */
470
    public function test_move_contents() {
470
    public function test_move_contents(): void {
471
        global $DB;
471
        global $DB;
Línea 472... Línea 472...
472
 
472
 
473
        $this->resetAfterTest();
473
        $this->resetAfterTest();
Línea 498... Línea 498...
498
    /**
498
    /**
499
     * Test the behaviour of move_contents() for empty content bank.
499
     * Test the behaviour of move_contents() for empty content bank.
500
     *
500
     *
501
     * @covers  ::move_contents
501
     * @covers  ::move_contents
502
     */
502
     */
503
    public function test_move_contents_for_empty_contentbank() {
503
    public function test_move_contents_for_empty_contentbank(): void {
Línea 504... Línea 504...
504
 
504
 
505
        $this->resetAfterTest();
505
        $this->resetAfterTest();
Línea 506... Línea 506...
506
        $cb = new \core_contentbank\contentbank();
506
        $cb = new \core_contentbank\contentbank();
Línea 611... Línea 611...
611
    /**
611
    /**
612
     * Test the behaviour of get_content_from_id()
612
     * Test the behaviour of get_content_from_id()
613
     *
613
     *
614
     * @covers  ::get_content_from_id
614
     * @covers  ::get_content_from_id
615
     */
615
     */
616
    public function test_get_content_from_id() {
616
    public function test_get_content_from_id(): void {
Línea 617... Línea 617...
617
 
617
 
618
        $this->resetAfterTest();
618
        $this->resetAfterTest();
Línea 619... Línea 619...
619
        $cb = new \core_contentbank\contentbank();
619
        $cb = new \core_contentbank\contentbank();