ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\WriterTest Class Reference
+ Inheritance diagram for Sabre\VObject\WriterTest:
+ Collaboration diagram for Sabre\VObject\WriterTest:

Public Member Functions

 getComponent ()
 
 testWriteToMimeDir ()
 
 testWriteToJson ()
 
 testWriteToXml ()
 

Detailed Description

Definition at line 7 of file WriterTest.php.

Member Function Documentation

◆ getComponent()

Sabre\VObject\WriterTest::getComponent ( )

Definition at line 9 of file WriterTest.php.

9 {
10
11 $data = "BEGIN:VCALENDAR\r\nEND:VCALENDAR";
12 return Reader::read($data);
13
14 }
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
$data
Definition: bench.php:6

References $data, and Sabre\VObject\Reader\read().

Referenced by Sabre\VObject\WriterTest\testWriteToJson(), Sabre\VObject\WriterTest\testWriteToMimeDir(), and Sabre\VObject\WriterTest\testWriteToXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testWriteToJson()

Sabre\VObject\WriterTest::testWriteToJson ( )

Definition at line 23 of file WriterTest.php.

23 {
24
26 $this->assertEquals('["vcalendar",[],[]]', $result);
27
28 }
$result
static writeJson(Component $component, $options=0)
Serializes a jCal or jCard object.
Definition: Writer.php:40

References $result, Sabre\VObject\WriterTest\getComponent(), and Sabre\VObject\Writer\writeJson().

+ Here is the call graph for this function:

◆ testWriteToMimeDir()

Sabre\VObject\WriterTest::testWriteToMimeDir ( )

Definition at line 16 of file WriterTest.php.

16 {
17
19 $this->assertEquals("BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n", $result);
20
21 }
static write(Component $component)
Serializes a vCard or iCalendar object.
Definition: Writer.php:26

References $result, Sabre\VObject\WriterTest\getComponent(), and Sabre\VObject\Writer\write().

+ Here is the call graph for this function:

◆ testWriteToXml()

Sabre\VObject\WriterTest::testWriteToXml ( )

Definition at line 30 of file WriterTest.php.

30 {
31
33 $this->assertEquals(
34 '<?xml version="1.0" encoding="UTF-8"?>' . "\n" .
35 '<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">' . "\n" .
36 ' <vcalendar/>' . "\n" .
37 '</icalendar>' . "\n",
39 );
40
41 }
static writeXml(Component $component)
Serializes a xCal or xCard object.
Definition: Writer.php:53

References $result, Sabre\VObject\WriterTest\getComponent(), and Sabre\VObject\Writer\writeXml().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: