Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 63... Línea 63...
63
            '試験.txt' => $this->testfile,
63
            '試験.txt' => $this->testfile,
64
            'Žluťoučký/Koníček.txt' => $file,
64
            'Žluťoučký/Koníček.txt' => $file,
65
        );
65
        );
66
    }
66
    }
Línea 67... Línea 67...
67
 
67
 
68
    public function test_get_packer() {
68
    public function test_get_packer(): void {
69
        $this->resetAfterTest(false);
69
        $this->resetAfterTest(false);
70
        $packer = get_file_packer();
70
        $packer = get_file_packer();
Línea 71... Línea 71...
71
        $this->assertInstanceOf('zip_packer', $packer);
71
        $this->assertInstanceOf('zip_packer', $packer);
Línea 75... Línea 75...
75
    }
75
    }
Línea 76... Línea 76...
76
 
76
 
77
    /**
77
    /**
78
     * @depends test_get_packer
78
     * @depends test_get_packer
79
     */
79
     */
80
    public function test_list_files() {
80
    public function test_list_files(): void {
Línea 81... Línea 81...
81
        $this->resetAfterTest(false);
81
        $this->resetAfterTest(false);
82
 
82
 
83
        $files = array(
83
        $files = array(
Línea 138... Línea 138...
138
    }
138
    }
Línea 139... Línea 139...
139
 
139
 
140
    /**
140
    /**
141
     * @depends test_list_files
141
     * @depends test_list_files
142
     */
142
     */
143
    public function test_archive_to_pathname() {
143
    public function test_archive_to_pathname(): void {
Línea 144... Línea 144...
144
        global $CFG;
144
        global $CFG;
Línea 145... Línea 145...
145
 
145
 
Línea 196... Línea 196...
196
    }
196
    }
Línea 197... Línea 197...
197
 
197
 
198
    /**
198
    /**
199
     * @depends test_archive_to_pathname
199
     * @depends test_archive_to_pathname
200
     */
200
     */
201
    public function test_archive_to_storage() {
201
    public function test_archive_to_storage(): void {
Línea 202... Línea 202...
202
        $this->resetAfterTest(false);
202
        $this->resetAfterTest(false);
203
 
203
 
204
        $packer = get_file_packer('application/zip');
204
        $packer = get_file_packer('application/zip');
Línea 219... Línea 219...
219
    }
219
    }
Línea 220... Línea 220...
220
 
220
 
221
    /**
221
    /**
222
     * @depends test_archive_to_storage
222
     * @depends test_archive_to_storage
223
     */
223
     */
224
    public function test_extract_to_pathname() {
224
    public function test_extract_to_pathname(): void {
Línea 225... Línea 225...
225
        global $CFG;
225
        global $CFG;
Línea 226... Línea 226...
226
 
226
 
Línea 262... Línea 262...
262
    /**
262
    /**
263
     * Test functionality of {@see zip_packer} for entries with folders ending with dots.
263
     * Test functionality of {@see zip_packer} for entries with folders ending with dots.
264
     *
264
     *
265
     * @link https://bugs.php.net/bug.php?id=77214
265
     * @link https://bugs.php.net/bug.php?id=77214
266
     */
266
     */
267
    public function test_zip_entry_path_having_folder_ending_with_dot() {
267
    public function test_zip_entry_path_having_folder_ending_with_dot(): void {
268
        global $CFG;
268
        global $CFG;
Línea 269... Línea 269...
269
 
269
 
Línea 270... Línea 270...
270
        $this->resetAfterTest(false);
270
        $this->resetAfterTest(false);
Línea 333... Línea 333...
333
    }
333
    }
Línea 334... Línea 334...
334
 
334
 
335
    /**
335
    /**
336
     * @depends test_archive_to_storage
336
     * @depends test_archive_to_storage
337
     */
337
     */
338
    public function test_extract_to_pathname_onlyfiles() {
338
    public function test_extract_to_pathname_onlyfiles(): void {
Línea 339... Línea 339...
339
        global $CFG;
339
        global $CFG;
Línea 340... Línea 340...
340
 
340
 
Línea 373... Línea 373...
373
    }
373
    }
Línea 374... Línea 374...
374
 
374
 
375
    /**
375
    /**
376
     * @depends test_archive_to_storage
376
     * @depends test_archive_to_storage
377
     */
377
     */
378
    public function test_extract_to_pathname_returnvalue_successful() {
378
    public function test_extract_to_pathname_returnvalue_successful(): void {
Línea 379... Línea 379...
379
        global $CFG;
379
        global $CFG;
Línea 380... Línea 380...
380
 
380
 
Línea 391... Línea 391...
391
    }
391
    }
Línea 392... Línea 392...
392
 
392
 
393
    /**
393
    /**
394
     * @depends test_archive_to_storage
394
     * @depends test_archive_to_storage
395
     */
395
     */
396
    public function test_extract_to_pathname_returnvalue_failure() {
396
    public function test_extract_to_pathname_returnvalue_failure(): void {
Línea 397... Línea 397...
397
        global $CFG;
397
        global $CFG;
Línea 398... Línea 398...
398
 
398
 
Línea 408... Línea 408...
408
    }
408
    }
Línea 409... Línea 409...
409
 
409
 
410
    /**
410
    /**
411
     * @depends test_archive_to_storage
411
     * @depends test_archive_to_storage
412
     */
412
     */
413
    public function test_extract_to_storage() {
413
    public function test_extract_to_storage(): void {
Línea 414... Línea 414...
414
        global $CFG;
414
        global $CFG;
Línea 415... Línea 415...
415
 
415
 
Línea 448... Línea 448...
448
    }
448
    }
Línea 449... Línea 449...
449
 
449
 
450
    /**
450
    /**
451
     * @depends test_extract_to_storage
451
     * @depends test_extract_to_storage
452
     */
452
     */
453
    public function test_add_files() {
453
    public function test_add_files(): void {
Línea 454... Línea 454...
454
        global $CFG;
454
        global $CFG;
Línea 455... Línea 455...
455
 
455
 
Línea 487... Línea 487...
487
        $zip_archive->close();
487
        $zip_archive->close();
Línea 488... Línea 488...
488
 
488
 
489
        unlink($archive);
489
        unlink($archive);
Línea 490... Línea 490...
490
    }
490
    }
491
 
491
 
Línea 492... Línea 492...
492
    public function test_close_archive() {
492
    public function test_close_archive(): void {
Línea 493... Línea 493...
493
        global $CFG;
493
        global $CFG;
Línea 557... Línea 557...
557
    }
557
    }
Línea 558... Línea 558...
558
 
558
 
559
    /**
559
    /**
560
     * @depends test_add_files
560
     * @depends test_add_files
561
     */
561
     */
562
    public function test_open_archive() {
562
    public function test_open_archive(): void {
Línea 563... Línea 563...
563
        global $CFG;
563
        global $CFG;
Línea 564... Línea 564...
564
 
564
 
Línea 604... Línea 604...
604
    }
604
    }
Línea 605... Línea 605...
605
 
605
 
606
    /**
606
    /**
607
     * Test opening an encrypted archive
607
     * Test opening an encrypted archive
608
     */
608
     */
609
    public function test_open_encrypted_archive() {
609
    public function test_open_encrypted_archive(): void {
Línea 610... Línea 610...
610
        $this->resetAfterTest();
610
        $this->resetAfterTest();
611
 
611
 
Línea 622... Línea 622...
622
    }
622
    }
Línea 623... Línea 623...
623
 
623
 
624
    /**
624
    /**
625
     * Tests the progress reporting.
625
     * Tests the progress reporting.
626
     */
626
     */
627
    public function test_file_progress() {
627
    public function test_file_progress(): void {
Línea 628... Línea 628...
628
        global $CFG;
628
        global $CFG;
629
 
629
 
630
        // Set up.
630
        // Set up.