コード例 #1
0
 public function testGetSetPostCode()
 {
     $expected = "postcode";
     $this->assertEmpty($this->instance->getPostcode());
     $this->assertTrue($this->instance->setPostcode($expected) instanceof Address);
     $this->assertEquals($expected, $this->instance->getPostcode());
 }
コード例 #2
0
 /**
  * @param Address $address
  * @return array
  */
 public static function extractAddress(Address $address)
 {
     return array("postCode" => $address->getPostcode());
 }
 /**
  * @param Address $address
  * @return bool
  */
 protected function hasPostCode(Address $address)
 {
     return false === empty($address->getPostcode());
 }