Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 21... Línea 21...
21
 *
21
 *
22
 * @package    core_calendar
22
 * @package    core_calendar
23
 * @copyright  2017 Mark Nelson <markn@moodle.com>
23
 * @copyright  2017 Mark Nelson <markn@moodle.com>
24
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 */
25
 */
26
class lib_test extends \advanced_testcase {
26
final class lib_test extends \advanced_testcase {
Línea 27... Línea 27...
27
 
27
 
28
    /**
28
    /**
29
     * Load required test libraries
29
     * Load required test libraries
30
     */
30
     */
31
    public static function setUpBeforeClass(): void {
31
    public static function setUpBeforeClass(): void {
Línea 32... Línea 32...
32
        global $CFG;
32
        global $CFG;
-
 
33
 
33
 
34
        require_once("{$CFG->dirroot}/calendar/tests/helpers.php");
Línea 34... Línea 35...
34
        require_once("{$CFG->dirroot}/calendar/tests/helpers.php");
35
        parent::setUpBeforeClass();
35
    }
36
    }
36
 
37
 
37
    /**
38
    /**
-
 
39
     * Tests set up
38
     * Tests set up
40
     */
39
     */
41
    protected function setUp(): void {
Línea 40... Línea 42...
40
    protected function setUp(): void {
42
        parent::setUp();
41
        $this->resetAfterTest();
43
        $this->resetAfterTest();
Línea 1224... Línea 1226...
1224
    /**
1226
    /**
1225
     * Data provider for {@see test_calendar_format_event_location}
1227
     * Data provider for {@see test_calendar_format_event_location}
1226
     *
1228
     *
1227
     * @return array[]
1229
     * @return array[]
1228
     */
1230
     */
1229
    public function calendar_format_event_location_provider(): array {
1231
    public static function calendar_format_event_location_provider(): array {
1230
        return [
1232
        return [
1231
            'Empty' => ['', ''],
1233
            'Empty' => ['', ''],
1232
            'Text' => ['Barcelona', 'Barcelona'],
1234
            'Text' => ['Barcelona', 'Barcelona'],
1233
            'Link (http)' => ['http://example.com', '<a title=".*" href="http://example.com">http://example.com</a>'],
1235
            'Link (http)' => ['http://example.com', '<a title=".*" href="http://example.com">http://example.com</a>'],
1234
            'Link (https)' => ['https://example.com', '<a title=".*" href="https://example.com">https://example.com</a>'],
1236
            'Link (https)' => ['https://example.com', '<a title=".*" href="https://example.com">https://example.com</a>'],