Lines Matching refs:property
15 $property = $cal->createProperty('propname','propvalue');
16 $this->assertEquals('PROPNAME', $property->name);
17 $this->assertEquals('propvalue', $property->__toString());
18 $this->assertEquals('propvalue', (string)$property);
19 $this->assertEquals('propvalue', $property->getValue());
32 $property = $cal->createProperty('propname','propvalue', $params);
34 $this->assertEquals('value1', $property['param1']->getValue());
35 $this->assertEquals('value2', $property['param2']->getValue());
43 $property = $cal->createProperty('propname','propvalue');
44 $property->setValue('value2');
46 $this->assertEquals('PROPNAME', $property->name);
47 $this->assertEquals('value2', $property->__toString());
54 $property = $cal->createProperty('propname','propvalue');
55 $property['paramname'] = 'paramvalue';
57 $this->assertTrue(isset($property['PARAMNAME']));
58 $this->assertTrue(isset($property['paramname']));
59 $this->assertFalse(isset($property['foo']));
66 $property = $cal->createProperty('propname','propvalue');
67 $property['paramname'] = 'paramvalue';
69 $this->assertInstanceOf('Sabre\\VObject\\Parameter',$property['paramname']);
76 $property = $cal->createProperty('propname','propvalue');
77 $property['paramname'] = 'paramvalue';
79 $this->assertInternalType('null',$property['foo']);
86 $property = $cal->createProperty('propname','propvalue');
87 $property['paramname'] = 'paramvalue';
88 $property->add('paramname', 'paramvalue');
90 $this->assertInstanceOf('Sabre\\VObject\\Parameter',$property['paramname']);
91 $this->assertEquals(2,count($property['paramname']->getParts()));
98 $property = $cal->createProperty('propname','propvalue');
99 $property['paramname'] = 'paramvalue';
101 $this->assertEquals(1,count($property->parameters()));
102 $this->assertInstanceOf('Sabre\\VObject\\Parameter', $property->parameters['PARAMNAME']);
103 $this->assertEquals('PARAMNAME',$property->parameters['PARAMNAME']->name);
104 $this->assertEquals('paramvalue',$property->parameters['PARAMNAME']->getValue());
111 $property = $cal->createProperty('propname','propvalue');
112 $property['paramname'] = 'paramvalue';
114 unset($property['PARAMNAME']);
115 $this->assertEquals(0,count($property->parameters()));
122 $property = $cal->createProperty('propname','propvalue');
124 $this->assertEquals("PROPNAME:propvalue\r\n",$property->serialize());
131 $property = $cal->createProperty('propname','propvalue', array(
136 …quals("PROPNAME;PARAMNAME=paramvalue;PARAMNAME2=paramvalue2:propvalue\r\n",$property->serialize());
143 $property = $cal->createProperty('SUMMARY',"line1\nline2");
145 $this->assertEquals("SUMMARY:line1\\nline2\r\n",$property->serialize());
153 $property = $cal->createProperty('propname',$value);
157 $this->assertEquals($expected,$property->serialize());
165 $property = $cal->createProperty('propname', $value);
167 $this->assertEquals($expected, $property->serialize());
175 $property = $cal->createProperty('propname','propvalue');
176 $property->setIterator($it);
177 $this->assertEquals($it,$property->getIterator());
185 $property = $cal->createProperty('propname','propvalue');
186 $it = $property->getIterator();
195 $property = $cal->createProperty('EMAIL');
197 $property->add('myparam','value');
199 $this->assertEquals(1, count($property->parameters()));
201 $this->assertTrue($property->parameters['MYPARAM'] instanceof Parameter);
202 $this->assertEquals('MYPARAM',$property->parameters['MYPARAM']->name);
203 $this->assertEquals('value',$property->parameters['MYPARAM']->getValue());
238 $property = $cal->createProperty('EMAIL','value');
239 $property['FOO'] = 'BAR';
241 $property2 = clone $property;
243 $property['FOO'] = 'BAZ';
251 $property = $cal->createProperty('X-PROP','value', array(
256 $this->assertEquals(1, count($property['PARAM1']->getParts()));
257 $this->assertEquals(2, count($property['PARAM2']->getParts()));
264 $property = $calendar->createProperty('X-PROP', "Bla\x00");
265 $result = $property->validate(Property::REPAIR);
268 $this->assertEquals('Bla', $property->getValue());
287 $property = $calendar->createProperty('X-PROP', $s);
288 $result = $property->validate(Property::REPAIR);
291 …0E()0D()0C()0B()0A(\\n)09( )08()07()06()05()04()03()02()01()00()]end", $property->getRawMimeDirVal…
298 $property = $calendar->createProperty("X_*&PROP*", "Bla");
299 $result = $property->validate(Property::REPAIR);
302 $this->assertEquals('X-PROP', $property->name);
309 $property = $calendar->createProperty("SUMMARY", null);
310 $this->assertEquals(array(), $property->getParts());
311 $this->assertNull($property->getValue());
313 $property->setValue(array());
314 $this->assertEquals(array(), $property->getParts());
315 $this->assertNull($property->getValue());
317 $property->setValue(array(1));
318 $this->assertEquals(array(1), $property->getParts());
319 $this->assertEquals(1, $property->getValue());
321 $property->setValue(array(1,2));
322 $this->assertEquals(array(1,2), $property->getParts());
323 $this->assertEquals('1,2', $property->getValue());
325 $property->setValue('str');
326 $this->assertEquals(array('str'), $property->getParts());
327 $this->assertEquals('str', $property->getValue());
338 $property = $calendar->createProperty("X-PROP", null);
340 $calendar->add($property);
353 $property = $calendar->createProperty("X-PROP", null);
355 $calendar->add($property);
363 $property = $document->add('X-FOO','value');
364 $property['ENCODING'] = 'invalid';
366 $result = $property->validate();
376 $property = $document->add('X-FOO','value');
377 $property['ENCODING'] = 'BASE64';
379 $result = $property->validate();
389 $property = $document->add('X-FOO','value');
390 $property['ENCODING'] = 'BASE64';
392 $result = $property->validate();
402 $property = $document->add('X-FOO','value');
403 $property['ENCODING'] = 'B';
405 $result = $property->validate();