1<?php
2
3namespace Sabre\VObject\Property;
4
5use Sabre\VObject;
6
7class FloatTest extends \PHPUnit_Framework_TestCase {
8
9    function testMimeDir() {
10
11        $input = "BEGIN:VCARD\r\nVERSION:4.0\r\nX-FLOAT;VALUE=FLOAT:0.234;1.245\r\nEND:VCARD\r\n";
12        $mimeDir = new VObject\Parser\MimeDir($input);
13
14        $result = $mimeDir->parse($input);
15
16        $this->assertInstanceOf('Sabre\VObject\Property\FloatValue', $result->{'X-FLOAT'});
17
18        $this->assertEquals([
19            0.234,
20            1.245,
21        ], $result->{'X-FLOAT'}->getParts());
22
23        $this->assertEquals(
24            $input,
25            $result->serialize()
26        );
27
28    }
29
30}
31