Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 41... Línea 41...
41
        'help' => false,
41
        'help' => false,
42
        'feature' => '',
42
        'feature' => '',
43
        'disable-composer' => false,
43
        'disable-composer' => false,
44
        'composer-upgrade' => true,
44
        'composer-upgrade' => true,
45
        'composer-self-update' => true,
45
        'composer-self-update' => true,
-
 
46
        'cleanup' => false,
46
    ],
47
    ],
47
    [
48
    [
48
        'h' => 'help',
49
        'h' => 'help',
49
        'f' => 'feature',
50
        'f' => 'feature',
-
 
51
        'c' => 'cleanup',
50
    ]
52
    ]
51
);
53
);
Línea 52... Línea 54...
52
 
54
 
53
// Checking run.php CLI script usage.
55
// Checking run.php CLI script usage.
Línea 58... Línea 60...
58
steps.
60
steps.
Línea 59... Línea 61...
59
 
61
 
60
Usage:
62
Usage:
61
    php runtestscenario.php    [--feature=\"value\"] [--help]
63
    php runtestscenario.php    [--feature=\"value\"] [--help]
62
                            [--no-composer-self-update] [--no-composer-upgrade]
64
                            [--no-composer-self-update] [--no-composer-upgrade]
Línea 63... Línea 65...
63
                            [--disable-composer]
65
                            [--disable-composer] [--cleanup]
64
 
66
 
Línea -... Línea 67...
-
 
67
Options:
-
 
68
-f, --feature      Execute specified feature file (Absolute path of feature file).
65
Options:
69
 
66
-f, --feature      Execute specified feature file (Absolute path of feature file).
70
-c, --cleanup      Execute the scenarios with @cleanup tag.
Línea 67... Línea 71...
67
 
71
 
68
--no-composer-self-update
72
--no-composer-self-update
Línea 77... Línea 81...
77
 
81
 
Línea 78... Línea 82...
78
-h, --help         Print out this help
82
-h, --help         Print out this help
79
 
83
 
-
 
84
Example from Moodle root directory:
80
Example from Moodle root directory:
85
\$ php admin/tool/generator/cli/runtestscenario.php --feature=/path/to/some/testing/scenario.feature
Línea 81... Línea 86...
81
\$ php admin/tool/generator/cli/runtestscenario.php --feature=/path/to/some/testing/scenario.feature
86
\$ php admin/tool/generator/cli/runtestscenario.php --feature=/path/to/some/testing/scenario.feature --cleanup
82
";
87
";
83
 
88
 
Línea 137... Línea 142...
137
    echo "The feature file is empty.\n";
142
    echo "The feature file is empty.\n";
138
    exit(0);
143
    exit(0);
139
}
144
}
Línea 140... Línea 145...
140
 
145
 
-
 
146
try {
-
 
147
    if (!empty($options['cleanup'])) {
-
 
148
        $parsedfeature = $runner->parse_cleanup($content);
141
try {
149
    } else {
-
 
150
        $parsedfeature = $runner->parse_feature($content);
142
    $parsedfeature = $runner->parse_feature($content);
151
    }
143
} catch (\Exception $error) {
152
} catch (\Exception $error) {
144
    echo "Error parsing feature file: {$error->getMessage()}\n";
153
    echo "Error parsing feature file: {$error->getMessage()}\n";
145
    echo "Use the web version of the tool to see the parsing details:\n";
154
    echo "Use the web version of the tool to see the parsing details:\n";
146
    echo "  Site administration -> development -> Create testing scenarios\n";
155
    echo "  Site administration -> development -> Create testing scenarios\n";