public function testSettersAndGettersMethods() { $this->assertEquals('390123456789', $this->object->getPhoneNumber()); $this->object->setPhoneNumber('333'); $this->assertEquals('333', $this->object->getPhoneNumber()); $this->object->setPhone('phone'); $this->assertEquals('phone', $this->object->getPhone()); $this->object->setCc('other'); $this->assertEquals('other', $this->object->getCc()); $this->object->setCountry('other'); $this->assertEquals('other', $this->object->getCountry()); $this->object->setIso3166('other'); $this->assertEquals('other', $this->object->getIso3166()); $this->object->setIso639('other'); $this->assertEquals('other', $this->object->getIso639()); $this->object->setMcc('other'); $this->assertEquals('other', $this->object->getMcc()); }
public function testPhone() { $phone = new Phone('+00.000000000'); $this->assertEquals('+00.000000000', $phone->getPhone()); $phone = new Phone('+0.000000'); $this->assertEquals('+00.000000000', $phone->getPhone()); // test space stripping $phone = new Phone('+00.0 0000 0000'); $this->assertEquals('+00.000000000', $phone->getPhone()); }