JeroenDesloovere\VCard\tests\VCardParserTest::testPhone PHP Method

testPhone() public method

public testPhone ( )
    public function testPhone()
    {
        $vcard = new VCard();
        $vcard->addPhoneNumber('0984456123');
        $vcard->addPhoneNumber('2015123487', 'WORK');
        $vcard->addPhoneNumber('4875446578', 'WORK');
        $vcard->addPhoneNumber('9875445464', 'PREF;WORK;VOICE');
        $parser = new VCardParser($vcard->buildVCard());
        $this->assertEquals($parser->getCardAtIndex(0)->phone['default'][0], '0984456123');
        $this->assertEquals($parser->getCardAtIndex(0)->phone['WORK'][0], '2015123487');
        $this->assertEquals($parser->getCardAtIndex(0)->phone['WORK'][1], '4875446578');
        $this->assertEquals($parser->getCardAtIndex(0)->phone['PREF;WORK;VOICE'][0], '9875445464');
    }