public function testEmail()
{
$vcard = new VCard();
$vcard->addEmail('*****@*****.**');
$vcard->addEmail('*****@*****.**', 'WORK');
$vcard->addEmail('*****@*****.**', 'WORK');
$vcard->addEmail('*****@*****.**', '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], '*****@*****.**');
$this->assertEquals($parser->getCardAtIndex(0)->email['INTERNET;WORK'][0], '*****@*****.**');
$this->assertEquals($parser->getCardAtIndex(0)->email['INTERNET;WORK'][1], '*****@*****.**');
$this->assertEquals($parser->getCardAtIndex(0)->email['INTERNET;PREF;WORK'][0], '*****@*****.**');
}