当前位置: 首页>>代码示例>>PHP>>正文


PHP Address::getPostalCode方法代码示例

本文整理汇总了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);
 }
开发者ID:leonardorifeli,项目名称:pagseguro,代码行数:14,代码来源:AddressTest.php

示例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();
 }
开发者ID:cocoders,项目名称:event-store,代码行数:12,代码来源:Buyer.php

示例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();
 }
开发者ID:cocoders,项目名称:event-store,代码行数:15,代码来源:Seller.php

示例4: testGetPostalCode

 /**
  * Tests Address->getPostalCode()
  */
 public function testGetPostalCode()
 {
     $this->assertEquals('POSTALCODE', $this->Address->getPostalCode());
 }
开发者ID:ahmedadham88,项目名称:enhanced-social-network,代码行数:7,代码来源:AddressTest.php

示例5: testSetPostalCode

 /**
  * @todo Implement testSetPostalCode().
  */
 public function testSetPostalCode()
 {
     $this->object->setPostalCode('N6G 2W3');
     $this->assertEquals($this->object->getPostalCode(), 'N6G 2W3');
 }
开发者ID:swat30,项目名称:safeballot,代码行数:8,代码来源:AddressTest.php

示例6: testSetPostalCode

 /**
  * Tests Address->setPostalCode()
  */
 public function testSetPostalCode()
 {
     $this->Address->setPostalCode('postalcode');
     $this->assertEquals('postalcode', $this->Address->getPostalCode());
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:8,代码来源:AddressTest.php

示例7: testSetPostalCodeWorks

 public function testSetPostalCodeWorks()
 {
     $address = new Address();
     $address->setPostalCode('90210');
     $this->assertEquals('90210', $address->getPostalCode());
 }
开发者ID:hilltool,项目名称:tray-php,代码行数:6,代码来源:AddressTest.php


注:本文中的Address::getPostalCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。