comparison vendor/sabre/vobject/tests/VObject/Property/BooleanTest.php @ 7:430dbd5346f7

vendor sabre as distributed
author Charlie Root
date Sat, 13 Jan 2018 09:06:10 -0500
parents
children
comparison
equal deleted inserted replaced
6:cec75ba50afc 7:430dbd5346f7
1 <?php
2
3 namespace Sabre\VObject\Property;
4
5 use Sabre\VObject;
6
7 class BooleanTest extends \PHPUnit_Framework_TestCase {
8
9 function testMimeDir() {
10
11 $input = "BEGIN:VCARD\r\nX-AWESOME;VALUE=BOOLEAN:TRUE\r\nX-SUCKS;VALUE=BOOLEAN:FALSE\r\nEND:VCARD\r\n";
12
13 $vcard = VObject\Reader::read($input);
14 $this->assertTrue($vcard->{'X-AWESOME'}->getValue());
15 $this->assertFalse($vcard->{'X-SUCKS'}->getValue());
16
17 $this->assertEquals('BOOLEAN', $vcard->{'X-AWESOME'}->getValueType());
18 $this->assertEquals($input, $vcard->serialize());
19
20 }
21
22 }