annotate vendor/sabre/vobject/tests/VObject/Property/ICalendar/CalAddressTest.php @ 7:430dbd5346f7

vendor sabre as distributed
author Charlie Root
date Sat, 13 Jan 2018 09:06:10 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
1 <?php
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
2
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
3 namespace Sabre\VObject\Property\ICalendar;
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
4
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
5 class CalAddressTest extends \PHPUnit_Framework_TestCase {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
6
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
7 /**
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
8 * @dataProvider values
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
9 */
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
10 function testGetNormalizedValue($expected, $input) {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
11
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
12 $vobj = new \Sabre\VObject\Component\VCalendar();
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
13 $property = $vobj->add('ATTENDEE', $input);
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
14
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
15 $this->assertEquals(
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
16 $expected,
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
17 $property->getNormalizedValue()
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
18 );
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
19
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
20 }
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
21
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
22 function values() {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
23
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
24 return array(
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
25 array('mailto:a@b.com', 'mailto:a@b.com'),
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
26 array('mailto:a@b.com', 'MAILTO:a@b.com'),
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
27 array('/foo/bar', '/foo/bar'),
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
28 );
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
29
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
30 }
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
31
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
32 }