1<?php
2
3namespace Sabre\VObject\Property;
4
5use Sabre\VObject;
6
7class 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}
23