ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
FloatTest.php
Go to the documentation of this file.
1<?php
2
4
5use PHPUnit\Framework\TestCase;
7
8class FloatTest extends TestCase {
9
10 function testMimeDir() {
11
12 $input = "BEGIN:VCARD\r\nVERSION:4.0\r\nX-FLOAT;VALUE=FLOAT:0.234;1.245\r\nEND:VCARD\r\n";
13 $mimeDir = new VObject\Parser\MimeDir($input);
14
15 $result = $mimeDir->parse($input);
16
17 $this->assertInstanceOf('Sabre\VObject\Property\FloatValue', $result->{'X-FLOAT'});
18
19 $this->assertEquals([
20 0.234,
21 1.245,
22 ], $result->{'X-FLOAT'}->getParts());
23
24 $this->assertEquals(
25 $input,
26 $result->serialize()
27 );
28
29 }
30
31}
$result
An exception for terminatinating execution or to throw for unit testing.
foreach($paths as $path) if($argc< 3) $input