Example #1
0
 /**
  * @group default
  * @depends testGetCardBody
  */
 public function testGetCardBodies()
 {
     $input = 'BEGIN:VCARD' . "\n" . 'VERSION:4.0' . "\n" . 'FN:foo' . "\n" . 'END:VCARD' . "\n" . 'BEGIN:VCARD' . "\n" . 'VERSION:4.0' . "\n" . 'FN:foo' . "\n" . 'END:VCARD' . "\n" . 'BEGIN:VCARD' . "\n" . 'VERSION:4.0' . "\n" . 'FN:foo' . "\n" . 'END:VCARD' . "\n";
     $matches = $this->parser->getCardBodies($input);
     $this->assertCount(3, $matches, print_r($matches, true));
     foreach ($matches as $components) {
         $this->assertArrayHasKey('version', $components);
         $this->assertEquals('4.0', $components['version']);
         $this->assertArrayHasKey('body', $components);
         $this->assertEquals("FN:foo\n", $components['body']);
     }
 }