CommerceGuys\Zone\Tests\PostalCodeHelperTest::getAddress PHP Метод

getAddress() защищенный Метод

Returns a mock address with the provided postal code.
protected getAddress ( string $postalCode = null ) : Address
$postalCode string The postal code.
Результат CommerceGuys\Addressing\Address
    protected function getAddress($postalCode = null)
    {
        $address = $this->getMockBuilder('CommerceGuys\\Addressing\\Address')->getMock();
        if ($postalCode) {
            $address->expects($this->any())->method('getPostalCode')->will($this->returnValue($postalCode));
        }
        return $address;
    }
PostalCodeHelperTest