Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 1... Línea 1...
1
<?php
1
<?php
2
// phpcs:ignoreFile
-
 
3
// @codeCoverageIgnoreStart
-
 
4
 
-
 
5
// This file is part of Moodle - http://moodle.org/
2
// This file is part of Moodle - http://moodle.org/
6
//
3
//
7
// Moodle is free software: you can redistribute it and/or modify
4
// Moodle is free software: you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License as published by
5
// it under the terms of the GNU General Public License as published by
9
// the Free Software Foundation, either version 3 of the License, or
6
// the Free Software Foundation, either version 3 of the License, or
Línea 41... Línea 38...
41
 *
38
 *
42
 * @package    tool_behat
39
 * @package    tool_behat
43
 * @copyright  2016 Rajesh Taneja
40
 * @copyright  2016 Rajesh Taneja
44
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
41
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
45
 */
42
 */
46
class manager_util_test extends \advanced_testcase {
43
final class manager_util_test extends \advanced_testcase {
47
 
-
 
48
    /** @var array Fixtures features which are available. */
44
    /** @var array Fixtures features which are available. */
49
    private $featurepaths = array(
45
    private $featurepaths = array(
50
        'default' => array(
46
        'default' => array(
51
            'test_1.feature',
47
            'test_1.feature',
52
            'test_2.feature',
48
            'test_2.feature',
Línea 105... Línea 101...
105
     * @param bool $notheme
101
     * @param bool $notheme
106
     * @return mixed
102
     * @return mixed
107
     */
103
     */
108
    private function get_behat_config_util($behatconfigutil, $notheme = false) {
104
    private function get_behat_config_util($behatconfigutil, $notheme = false) {
109
        // Create a map of arguments to return values.
105
        // Create a map of arguments to return values.
110
        $map = array(
106
        $map = [
111
            array('withfeatures', __DIR__.'/fixtures/theme/withfeatures'),
107
            ['withfeatures', self::get_fixture_path(__NAMESPACE__, 'theme/withfeatures')],
112
            array('nofeatures', __DIR__.'/fixtures/theme/nofeatures'),
108
            ['nofeatures', self::get_fixture_path(__NAMESPACE__, 'theme/nofeatures')],
113
            array('defaulttheme', __DIR__.'/fixtures/theme/defaulttheme'),
109
            ['defaulttheme', self::get_fixture_path(__NAMESPACE__, 'theme/defaulttheme')],
114
        );
110
        ];
115
        // List of themes is const for test.
111
        // List of themes is const for test.
116
        if ($notheme) {
112
        if ($notheme) {
117
            $themelist = array('defaulttheme');
113
            $themelist = array('defaulttheme');
118
        } else {
114
        } else {
119
            $themelist = array('withfeatures', 'nofeatures', 'defaulttheme');
115
            $themelist = array('withfeatures', 'nofeatures', 'defaulttheme');
Línea 470... Línea 466...
470
        $this->assertEquals($cleanfeaturepath, $retcleanfeaturepath);
466
        $this->assertEquals($cleanfeaturepath, $retcleanfeaturepath);
471
        //FIXME: MDL-55722 work out why this is necessary..
467
        //FIXME: MDL-55722 work out why this is necessary..
472
        $CFG->dirroot = $oldroot;
468
        $CFG->dirroot = $oldroot;
473
    }
469
    }
Línea 474... Línea 470...
474
 
470
 
475
    public function clean_features_path_list() {
471
    public static function clean_features_path_list() {
476
        return array(
472
        return array(
477
            ['/home/test/this/that/test/behat/mod_assign.feature', 'mod_assign_behat_test_that_this_test', '/home/test/this/that/test/behat/mod_assign.feature'],
473
            ['/home/test/this/that/test/behat/mod_assign.feature', 'mod_assign_behat_test_that_this_test', '/home/test/this/that/test/behat/mod_assign.feature'],
478
            ['/home/this/that/test/behat/mod_assign.feature', 'mod_assign_behat_test_that_this_home', '/home/this/that/test/behat/mod_assign.feature'],
474
            ['/home/this/that/test/behat/mod_assign.feature', 'mod_assign_behat_test_that_this_home', '/home/this/that/test/behat/mod_assign.feature'],
479
            ['/home/that/test/behat/mod_assign.feature', 'mod_assign_behat_test_that_home', '/home/that/test/behat/mod_assign.feature'],
475
            ['/home/that/test/behat/mod_assign.feature', 'mod_assign_behat_test_that_home', '/home/that/test/behat/mod_assign.feature'],