Пример #1
0
 public function testClear()
 {
     $vcard = new vCard();
     $vcard->setProperty('dog', 'cat');
     $vcard->clear();
     $this->assertNull($vcard->getProperty('dog'));
 }
Пример #2
0
 /**
  * @depends testUID
  * @group default
  */
 public function testGetUIDMagic(vCard $vcard)
 {
     // UID, when presented as a property, *always has a value* so that the
     // VCard will always have a primary key when output.
     $this->assertNull($vcard->getUID());
     /* @var $property1 Property */
     $property1 = $vcard->uid;
     $this->assertNotEmpty($property1);
     $this->assertInstanceOf(__NAMESPACE__ . '\\Property', $property1);
     $this->assertEquals('uid', $property1->getName());
     $vcard->setUID('Some UID');
     /* @var $property2 Property */
     $property2 = $vcard->uid;
     $this->assertNotEmpty($property2);
     $this->assertInstanceOf(__NAMESPACE__ . '\\Property', $property2);
     $this->assertEquals('uid', $property2->getName());
     $this->assertEquals('Some UID', $property2->getValue());
     return $vcard->clear();
 }