Example #1
0
 /**
  * @group default
  */
 public function testImportJohnDoeFromFile()
 {
     $path = __DIR__ . '/vcards/JohnDoe.vcf';
     $vcard = $this->getJohnDoe();
     $vcards = $this->parser->importFromFile($path);
     $this->assertCount(1, $vcards);
     $this->assertEquals($vcard, $vcards[0], print_r($vcards[0]->getUID(), true));
 }
Example #2
0
 /**
  * Some cards for testing.
  * @return an individual VCard.
  */
 public function getDDBinks()
 {
     if (null === $this->ddBinks) {
         $path = __DIR__ . '/vcards/DDBinks.vcf';
         $parser = new VCardParser();
         $vcards = $parser->importFromFile($path);
         $this->assertCount(1, $vcards);
         $this->ddBinks = $vcards[0];
     }
     return $this->ddBinks;
 }