Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 105... Línea 105...
105
    }
105
    }
Línea 106... Línea 106...
106
 
106
 
107
    /**
107
    /**
108
     * Tests getting the item.
108
     * Tests getting the item.
109
     */
109
     */
110
    public function test_get_packer() {
110
    public function test_get_packer(): void {
111
        $packer = get_file_packer('application/x-gzip');
111
        $packer = get_file_packer('application/x-gzip');
112
        $this->assertInstanceOf('tgz_packer', $packer);
112
        $this->assertInstanceOf('tgz_packer', $packer);
Línea 113... Línea 113...
113
    }
113
    }
114
 
114
 
115
    /**
115
    /**
116
     * Tests basic archive and extract to file paths.
116
     * Tests basic archive and extract to file paths.
117
     */
117
     */
118
    public function test_to_normal_files() {
118
    public function test_to_normal_files(): void {
Línea 119... Línea 119...
119
        global $CFG;
119
        global $CFG;
120
        $packer = get_file_packer('application/x-gzip');
120
        $packer = get_file_packer('application/x-gzip');
Línea 154... Línea 154...
154
    }
154
    }
Línea 155... Línea 155...
155
 
155
 
156
    /**
156
    /**
157
     * Tests archive and extract to Moodle file system.
157
     * Tests archive and extract to Moodle file system.
158
     */
158
     */
159
    public function test_to_stored_files() {
159
    public function test_to_stored_files(): void {
160
        global $CFG;
160
        global $CFG;
Línea 161... Línea 161...
161
        $packer = get_file_packer('application/x-gzip');
161
        $packer = get_file_packer('application/x-gzip');
162
 
162
 
Línea 220... Línea 220...
220
    }
220
    }
Línea 221... Línea 221...
221
 
221
 
222
    /**
222
    /**
223
     * Tests extracting with a list of specified files.
223
     * Tests extracting with a list of specified files.
224
     */
224
     */
225
    public function test_only_specified_files() {
225
    public function test_only_specified_files(): void {
226
        global $CFG;
226
        global $CFG;
Línea 227... Línea 227...
227
        $packer = get_file_packer('application/x-gzip');
227
        $packer = get_file_packer('application/x-gzip');
228
 
228
 
Línea 252... Línea 252...
252
    }
252
    }
Línea 253... Línea 253...
253
 
253
 
254
    /**
254
    /**
255
     * Tests extracting files returning only a boolean state with success.
255
     * Tests extracting files returning only a boolean state with success.
256
     */
256
     */
257
    public function test_extract_to_pathname_returnvalue_successful() {
257
    public function test_extract_to_pathname_returnvalue_successful(): void {
Línea 258... Línea 258...
258
        $packer = get_file_packer('application/x-gzip');
258
        $packer = get_file_packer('application/x-gzip');
259
 
259
 
260
        // Prepare files.
260
        // Prepare files.
Línea 270... Línea 270...
270
    }
270
    }
Línea 271... Línea 271...
271
 
271
 
272
    /**
272
    /**
273
     * Tests extracting files returning only a boolean state with failure.
273
     * Tests extracting files returning only a boolean state with failure.
274
     */
274
     */
275
    public function test_extract_to_pathname_returnvalue_failure() {
275
    public function test_extract_to_pathname_returnvalue_failure(): void {
Línea 276... Línea 276...
276
        $packer = get_file_packer('application/x-gzip');
276
        $packer = get_file_packer('application/x-gzip');
277
 
277
 
278
        // Create sample files.
278
        // Create sample files.
Línea 288... Línea 288...
288
    }
288
    }
Línea 289... Línea 289...
289
 
289
 
290
    /**
290
    /**
291
     * Tests the progress reporting.
291
     * Tests the progress reporting.
292
     */
292
     */
293
    public function test_file_progress() {
293
    public function test_file_progress(): void {
Línea 294... Línea 294...
294
        global $CFG;
294
        global $CFG;
295
 
295
 
296
        // Set up.
296
        // Set up.
Línea 345... Línea 345...
345
    }
345
    }
Línea 346... Línea 346...
346
 
346
 
347
    /**
347
    /**
348
     * Tests the list_files function with and without an index file.
348
     * Tests the list_files function with and without an index file.
349
     */
349
     */
350
    public function test_list_files() {
350
    public function test_list_files(): void {
Línea 351... Línea 351...
351
        global $CFG;
351
        global $CFG;
352
 
352
 
353
        // Set up.
353
        // Set up.
Línea 412... Línea 412...
412
            return strcmp($a[0], $b[0]);
412
            return strcmp($a[0], $b[0]);
413
        });
413
        });
414
        return $actualinfo;
414
        return $actualinfo;
415
    }
415
    }
Línea 416... Línea 416...
416
 
416
 
417
    public function test_is_tgz_file() {
417
    public function test_is_tgz_file(): void {
Línea 418... Línea 418...
418
        global $CFG;
418
        global $CFG;
419
 
419
 
420
        // Set up.
420
        // Set up.