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

Public Member Functions

 createStream ($data)
 
 testVCardImportValidVCard ()
 
 testVCardImportWrongType ()
 Sabre More...
 
 testVCardImportValidVCardsWithCategories ()
 
 testVCardImportEndOfData ()
 
 testVCardImportCheckInvalidArgumentException ()
 
 testVCardImportMultipleValidVCards ()
 
 testImportMultipleSeparatedWithNewLines ()
 
 testVCardImportVCardWithoutUID ()
 

Detailed Description

Definition at line 7 of file VCardTest.php.

Member Function Documentation

◆ createStream()

◆ testImportMultipleSeparatedWithNewLines()

Sabre\VObject\Splitter\VCardTest::testImportMultipleSeparatedWithNewLines ( )

Definition at line 155 of file VCardTest.php.

References $data, and Sabre\VObject\Splitter\VCardTest\createStream().

155  {
156  $data = <<<EOT
157 BEGIN:VCARD
158 UID:foo
159 END:VCARD
160 
161 
162 BEGIN:VCARD
163 UID:foo
164 END:VCARD
165 
166 
167 EOT;
168  $tempFile = $this->createStream($data);
169  $objects = new VCard($tempFile);
170 
171  $count = 0;
172  while ($objects->getNext()) {
173  $count++;
174  }
175  $this->assertEquals(2, $count);
176  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ testVCardImportCheckInvalidArgumentException()

Sabre\VObject\Splitter\VCardTest::testVCardImportCheckInvalidArgumentException ( )

Definition at line 122 of file VCardTest.php.

References $data, and Sabre\VObject\Splitter\VCardTest\createStream().

122  {
123  $data = <<<EOT
124 BEGIN:FOO
125 END:FOO
126 EOT;
127  $tempFile = $this->createStream($data);
128 
129  $objects = new VCard($tempFile);
130  while ($objects->getNext()) { }
131 
132  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ testVCardImportEndOfData()

Sabre\VObject\Splitter\VCardTest::testVCardImportEndOfData ( )

Definition at line 103 of file VCardTest.php.

References $data, and Sabre\VObject\Splitter\VCardTest\createStream().

103  {
104  $data = <<<EOT
105 BEGIN:VCARD
106 UID:foo
107 END:VCARD
108 EOT;
109  $tempFile = $this->createStream($data);
110 
111  $objects = new VCard($tempFile);
112  $object = $objects->getNext();
113 
114  $this->assertNull($objects->getNext());
115 
116 
117  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ testVCardImportMultipleValidVCards()

Sabre\VObject\Splitter\VCardTest::testVCardImportMultipleValidVCards ( )

Definition at line 134 of file VCardTest.php.

References $data, and Sabre\VObject\Splitter\VCardTest\createStream().

134  {
135  $data = <<<EOT
136 BEGIN:VCARD
137 UID:foo
138 END:VCARD
139 BEGIN:VCARD
140 UID:foo
141 END:VCARD
142 EOT;
143  $tempFile = $this->createStream($data);
144 
145  $objects = new VCard($tempFile);
146 
147  $count = 0;
148  while ($objects->getNext()) {
149  $count++;
150  }
151  $this->assertEquals(2, $count);
152 
153  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ testVCardImportValidVCard()

Sabre\VObject\Splitter\VCardTest::testVCardImportValidVCard ( )

Definition at line 18 of file VCardTest.php.

References $data, and Sabre\VObject\Splitter\VCardTest\createStream().

18  {
19  $data = <<<EOT
20 BEGIN:VCARD
21 UID:foo
22 END:VCARD
23 EOT;
24  $tempFile = $this->createStream($data);
25 
26  $objects = new VCard($tempFile);
27 
28  $count = 0;
29  while ($objects->getNext()) {
30  $count++;
31  }
32  $this->assertEquals(1, $count);
33 
34  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ testVCardImportValidVCardsWithCategories()

Sabre\VObject\Splitter\VCardTest::testVCardImportValidVCardsWithCategories ( )

Definition at line 72 of file VCardTest.php.

References $data, Sabre\VObject\$splitter, and Sabre\VObject\Splitter\VCardTest\createStream().

72  {
73  $data = <<<EOT
74 BEGIN:VCARD
75 UID:card-in-foo1-and-foo2
76 CATEGORIES:foo1,foo2
77 END:VCARD
78 BEGIN:VCARD
79 UID:card-in-foo1
80 CATEGORIES:foo1
81 END:VCARD
82 BEGIN:VCARD
83 UID:card-in-foo3
84 CATEGORIES:foo3
85 END:VCARD
86 BEGIN:VCARD
87 UID:card-in-foo1-and-foo3
88 CATEGORIES:foo1\,foo3
89 END:VCARD
90 EOT;
91  $tempFile = $this->createStream($data);
92 
93  $splitter = new VCard($tempFile);
94 
95  $count = 0;
96  while ($object = $splitter->getNext()) {
97  $count++;
98  }
99  $this->assertEquals(4, $count);
100 
101  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ testVCardImportVCardWithoutUID()

Sabre\VObject\Splitter\VCardTest::testVCardImportVCardWithoutUID ( )

Definition at line 178 of file VCardTest.php.

References $data, and Sabre\VObject\Splitter\VCardTest\createStream().

178  {
179  $data = <<<EOT
180 BEGIN:VCARD
181 END:VCARD
182 EOT;
183  $tempFile = $this->createStream($data);
184 
185  $objects = new VCard($tempFile);
186 
187  $count = 0;
188  while ($objects->getNext()) {
189  $count++;
190  }
191 
192  $this->assertEquals(1, $count);
193  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ testVCardImportWrongType()

Sabre\VObject\Splitter\VCardTest::testVCardImportWrongType ( )

Sabre

Definition at line 39 of file VCardTest.php.

References $data, Sabre\VObject\$splitter, and Sabre\VObject\Splitter\VCardTest\createStream().

39  {
40  $event[] = <<<EOT
41 BEGIN:VEVENT
42 UID:foo1
43 DTSTAMP:20140122T233226Z
44 DTSTART:20140101T050000Z
45 END:VEVENT
46 EOT;
47 
48 $event[] = <<<EOT
49 BEGIN:VEVENT
50 UID:foo2
51 DTSTAMP:20140122T233226Z
52 DTSTART:20140101T060000Z
53 END:VEVENT
54 EOT;
55 
56  $data = <<<EOT
57 BEGIN:VCALENDAR
58 $event[0]
59 $event[1]
60 END:VCALENDAR
61 
62 EOT;
63  $tempFile = $this->createStream($data);
64 
65  $splitter = new VCard($tempFile);
66 
67  while ($object = $splitter->getNext()) {
68  }
69 
70  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:

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