Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 31... Línea 31...
31
 * @category  test
31
 * @category  test
32
 * @copyright 2017 Andrew Nicols <andrew@nicols.co.uk>
32
 * @copyright 2017 Andrew Nicols <andrew@nicols.co.uk>
33
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 * @coversDefaultClass \file_system_filedir
34
 * @coversDefaultClass \file_system_filedir
35
 */
35
 */
36
class file_system_filedir_test extends \advanced_testcase {
36
final class file_system_filedir_test extends \advanced_testcase {
Línea 37... Línea 37...
37
 
37
 
38
    /**
38
    /**
39
     * Shared test setUp.
39
     * Shared test setUp.
40
     */
40
     */
-
 
41
    public function setUp(): void {
41
    public function setUp(): void {
42
        parent::setUp();
42
        // Reset the file storage so that subsequent fetches to get_file_storage are called after
43
        // Reset the file storage so that subsequent fetches to get_file_storage are called after
43
        // configuration is prepared.
44
        // configuration is prepared.
44
        get_file_storage(true);
45
        get_file_storage(true);
Línea 48... Línea 49...
48
     * Shared teset tearDown.
49
     * Shared teset tearDown.
49
     */
50
     */
50
    public function tearDown(): void {
51
    public function tearDown(): void {
51
        // Reset the file storage so that subsequent tests will use the standard file storage.
52
        // Reset the file storage so that subsequent tests will use the standard file storage.
52
        get_file_storage(true);
53
        get_file_storage(true);
-
 
54
        parent::tearDown();
53
    }
55
    }
Línea 54... Línea 56...
54
 
56
 
55
    /**
57
    /**
56
     * Helper function to help setup and configure the virtual file system stream.
58
     * Helper function to help setup and configure the virtual file system stream.
Línea 1091... Línea 1093...
1091
    /**
1093
    /**
1092
     * Data Provider for contenthash to contendir conversion.
1094
     * Data Provider for contenthash to contendir conversion.
1093
     *
1095
     *
1094
     * @return  array
1096
     * @return  array
1095
     */
1097
     */
1096
    public function contenthash_dataprovider() {
1098
    public static function contenthash_dataprovider(): array {
1097
        return array(
1099
        return array(
1098
            array(
1100
            array(
1099
                'contenthash'   => 'eee4943847a35a4b6942c6f96daafde06bcfdfab',
1101
                'hash'   => 'eee4943847a35a4b6942c6f96daafde06bcfdfab',
1100
                'contentdir'    => 'ee/e4',
1102
                'hashdir'    => 'ee/e4',
1101
            ),
1103
            ),
1102
            array(
1104
            array(
1103
                'contenthash'   => 'aef05a62ae81ca0005d2569447779af062b7cda0',
1105
                'hash'   => 'aef05a62ae81ca0005d2569447779af062b7cda0',
1104
                'contentdir'    => 'ae/f0',
1106
                'hashdir'    => 'ae/f0',
1105
            ),
1107
            ),
1106
        );
1108
        );
1107
    }
1109
    }
1108
}
1110
}