summaryrefslogtreecommitdiff
path: root/includes/composer/vendor/om/icalparser/tests/event.url.phpt
blob: b39d3e3f1507abf81c4511b0f7a783391177e97c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * Copyright (c) 2004-2022 Roman Ožana (https://ozana.cz)
 *
 * @license BSD-3-Clause
 * @author Roman Ožana <roman@ozana.cz>
 */

use om\IcalParser;
use Tester\Assert;
use function tests\test;

require_once __DIR__ . '/bootstrap.php';

test('URL parsing check', function () {
	$cal = new IcalParser();
	$cal->parseFile(__DIR__ . '/cal/url.ics');
	$first = $cal->getEvents()->getIterator()->current();

	Assert::hasKey('URL', $first);
	Assert::same($first['URL'], urlencode('https://github.com/OzzyCzech/icalparser/'));
});