本文整理汇总了PHP中Address::getPostalCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Address::getPostalCode方法的具体用法?PHP Address::getPostalCode怎么用?PHP Address::getPostalCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Address
的用法示例。
在下文中一共展示了Address::getPostalCode方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gettersShouldReturnTheAttributeValue
/**
* @test
*/
public function gettersShouldReturnTheAttributeValue()
{
$this->assertAttributeEquals($this->address->getCountry(), 'country', $this->address);
$this->assertAttributeEquals($this->address->getState(), 'state', $this->address);
$this->assertAttributeEquals($this->address->getCity(), 'city', $this->address);
$this->assertAttributeEquals($this->address->getPostalCode(), 'postalCode', $this->address);
$this->assertAttributeEquals($this->address->getDistrict(), 'district', $this->address);
$this->assertAttributeEquals($this->address->getStreet(), 'street', $this->address);
$this->assertAttributeEquals($this->address->getNumber(), 'number', $this->address);
$this->assertAttributeEquals($this->address->getComplement(), 'complement', $this->address);
}
示例2: __construct
public function __construct($name, TaxIdNumber $taxIdNumber, Address $address, BankAccount $account)
{
$this->name = $name;
$this->taxIdNumber = (string) $taxIdNumber;
$this->postalCode = $address->getPostalCode();
$this->street = $address->getStreet();
$this->city = $address->getCity();
$this->country = $address->getCountry();
$this->bankName = $account->getBankName();
$this->bankNumber = $account->getBankNumber();
$this->bicCode = $account->getBicCode();
}
示例3: __construct
public function __construct($name, TaxIdNumber $taxIdNumber, Address $address, BankAccount $account)
{
if (!$name) {
throw new \InvalidArgumentException('Name is required');
}
$this->name = $name;
$this->taxIdNumber = (string) $taxIdNumber;
$this->postalCode = $address->getPostalCode();
$this->street = $address->getStreet();
$this->city = $address->getCity();
$this->country = $address->getCountry();
$this->bankName = $account->getBankName();
$this->bankNumber = $account->getBankNumber();
$this->bicCode = $account->getBicCode();
}
示例4: testGetPostalCode
/**
* Tests Address->getPostalCode()
*/
public function testGetPostalCode()
{
$this->assertEquals('POSTALCODE', $this->Address->getPostalCode());
}
示例5: testSetPostalCode
/**
* @todo Implement testSetPostalCode().
*/
public function testSetPostalCode()
{
$this->object->setPostalCode('N6G 2W3');
$this->assertEquals($this->object->getPostalCode(), 'N6G 2W3');
}
示例6: testSetPostalCode
/**
* Tests Address->setPostalCode()
*/
public function testSetPostalCode()
{
$this->Address->setPostalCode('postalcode');
$this->assertEquals('postalcode', $this->Address->getPostalCode());
}
示例7: testSetPostalCodeWorks
public function testSetPostalCodeWorks()
{
$address = new Address();
$address->setPostalCode('90210');
$this->assertEquals('90210', $address->getPostalCode());
}