public function testEmail()
{
$vcard = new VCard();
$vcard->addEmail('[email protected]');
$vcard->addEmail('[email protected]', 'WORK');
$vcard->addEmail('[email protected]', 'WORK');
$vcard->addEmail('[email protected]', 'PREF;WORK');
$parser = new VCardParser($vcard->buildVCard());
// The VCard class uses a default type of "INTERNET", so we do not test
// against the "default" key.
$this->assertEquals($parser->getCardAtIndex(0)->email['INTERNET'][0], '[email protected]');
$this->assertEquals($parser->getCardAtIndex(0)->email['INTERNET;WORK'][0], '[email protected]');
$this->assertEquals($parser->getCardAtIndex(0)->email['INTERNET;WORK'][1], '[email protected]');
$this->assertEquals($parser->getCardAtIndex(0)->email['INTERNET;PREF;WORK'][0], '[email protected]');
}