Example #1
0
 /**
  * @group default
  * @depends testImportVCardSeinarAPLFromFile
  * @depends testImportVCardRaithSeinarFromFile
  * @depends testImportVCardDDBinksFromFile
  */
 public function testImportMultipleVCardsOnePass()
 {
     $inputString = '';
     foreach (['DDBinks.vcf', 'RaithSeinar.vcf', 'SeinarAPL.vcf'] as $file) {
         $path = __DIR__ . '/vcards/' . $file;
         $inputString .= \file_get_contents($path);
         $vcards = $this->parser->importCards($inputString);
     }
     $this->assertCount(3, $vcards);
     $ddBinks = $this->getDDBinks();
     $raithSeinar = $this->getRaithSeinar();
     $seinarAPL = $this->getSeinarAPL();
     $this->assertEquals($ddBinks, $vcards[0]);
     $this->assertEquals($raithSeinar, $vcards[1]);
     $this->assertEquals($seinarAPL, $vcards[2]);
     $uids = $this->parser->getUIDs();
     $this->assertCount(3, $uids);
     $this->assertContains($ddBinks->getUID(), $uids);
     $this->assertContains($raithSeinar->getUID(), $uids);
     $this->assertContains($seinarAPL->getUID(), $uids);
     $this->assertEquals($ddBinks, $this->parser->getCard($ddBinks->getUID()));
     $this->assertEquals($raithSeinar, $this->parser->getCard($raithSeinar->getUID()));
     $this->assertEquals($seinarAPL, $this->parser->getCard($seinarAPL->getUID()));
 }