Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 29... Línea 29...
29
 * @package    core
29
 * @package    core
30
 * @category   test
30
 * @category   test
31
 * @copyright  2021 Université Rennes 2 {@link https://www.univ-rennes2.fr}
31
 * @copyright  2021 Université Rennes 2 {@link https://www.univ-rennes2.fr}
32
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
32
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 */
33
 */
34
class behat_lib_test extends advanced_testcase {
34
final class behat_lib_test extends advanced_testcase {
Línea 35... Línea 35...
35
 
35
 
36
    /**
36
    /**
37
     * Setup function
37
     * Setup function
38
     *
38
     *
39
     * Skip these tests if behat is not configured.
39
     * Skip these tests if behat is not configured.
40
     *
40
     *
41
     * @return void
41
     * @return void
42
     */
42
     */
43
    public function setUp(): void {
43
    public function setUp(): void {
-
 
44
        global $CFG;
Línea 44... Línea 45...
44
        global $CFG;
45
        parent::setUp();
45
 
46
 
46
        if (empty($CFG->behat_wwwroot) || empty($CFG->behat_dataroot) || empty($CFG->behat_prefix)) {
47
        if (empty($CFG->behat_wwwroot) || empty($CFG->behat_dataroot) || empty($CFG->behat_prefix)) {
47
            $this->markTestSkipped('Behat not configured');
48
            $this->markTestSkipped('Behat not configured');
Línea 75... Línea 76...
75
    /**
76
    /**
76
     * Data provider for test_behat_is_requested_url.
77
     * Data provider for test_behat_is_requested_url.
77
     *
78
     *
78
     * @return array Array of values to test behat_is_requested_url() function.
79
     * @return array Array of values to test behat_is_requested_url() function.
79
     */
80
     */
80
    public function url_provider() {
81
    public static function url_provider(): array {
81
        return [
82
        return [
82
            // Tests for common ports.
83
            // Tests for common ports.
83
            ['http://behat.moodle.org', true, ['behat.moodle.org', 80, '']],
84
            ['http://behat.moodle.org', true, ['behat.moodle.org', 80, '']],
84
            ['https://behat.moodle.org', true, ['behat.moodle.org', 443, '']],
85
            ['https://behat.moodle.org', true, ['behat.moodle.org', 443, '']],