Example #1
0
 /**
  * @group default
  * @depends testConstructEmptyVCard
  */
 public function testgetGroupMembersEmpty(VCard $vcard)
 {
     $iter = $vcard->getGroupMembers("properties-anonymous");
     $this->assertFalse($iter->valid());
 }
Example #2
0
 /**
  * Return an iterator over all Properties in this container which are not
  * defined.
  * @return \Iterator
  */
 public function getUndefinedProperties()
 {
     return new \CallbackFilterIterator($this, function ($current) {
         \assert($current instanceof Property);
         return VCard::isSpecified($current->getName()) === false;
     });
 }
Example #3
0
 /**
  * @group default
  * @depends testStoreAndRetrieveVCard
  */
 public function testStoreAndRetrieveWCategory(VCardDB $vcardDB)
 {
     $this->checkRowCounts(['CONTACT' => 0]);
     $expected = ['fn' => 'Sigmund Freud', 'category' => 'mental health'];
     $vcard = new VCard();
     $vcard->push(VCard::builder('fn')->setValue($expected['fn'])->build());
     $vcard->push(VCard::builder('categories')->setValue($expected['category'])->build());
     $contactID = $vcardDB->store($vcard);
     $this->checkRowCounts(['CONTACT' => 1, 'CONTACT_CATEGORIES' => 1], $vcard);
     $resultVCard = $vcardDB->fetchOne($contactID);
     $this->compareVCards($vcard, $resultVCard);
 }