PHP Class CommerceGuys\Addressing\Tests\Formatter\PostalLabelFormatterTest

Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: commerceguys/addressing

Protected Properties

Property Type Description
$addressFormatRepository AddressFormatRepositoryInterface The address format repository.
$countryRepository CountryRepositoryInterface The country repository.
$formatter CommerceGuys\Addressing\Formatter\PostalLabelFormatter The formatter.
$subdivisionRepository SubdivisionRepositoryInterface The subdivision repository.

Public Methods

Method Description
setUp ( )
testAddressLeadingPostPrefix ( )
testEmptyAddress ( )
testJapanAddressShippedFromFrance ( )
testMissingOriginCountryCode ( )
testOriginCountryCode ( )
testUnitedStatesAddress ( )

Protected Methods

Method Description
assertFormattedAddress ( array $expectedLines, string $formattedAddress ) Asserts that the formatted address is valid.

Method Details

assertFormattedAddress() protected method

Asserts that the formatted address is valid.
protected assertFormattedAddress ( array $expectedLines, string $formattedAddress )
$expectedLines array
$formattedAddress string

setUp() public method

public setUp ( )

testAddressLeadingPostPrefix() public method

testEmptyAddress() public method

public testEmptyAddress ( )

testJapanAddressShippedFromFrance() public method

testMissingOriginCountryCode() public method

testOriginCountryCode() public method

testUnitedStatesAddress() public method

Property Details

$addressFormatRepository protected property

The address format repository.
protected AddressFormatRepositoryInterface $addressFormatRepository
return AddressFormatRepositoryInterface

$countryRepository protected property

The country repository.
protected CountryRepositoryInterface $countryRepository
return CountryRepositoryInterface

$formatter protected property

The formatter.
protected PostalLabelFormatter,CommerceGuys\Addressing\Formatter $formatter
return CommerceGuys\Addressing\Formatter\PostalLabelFormatter

$subdivisionRepository protected property

The subdivision repository.
protected SubdivisionRepositoryInterface $subdivisionRepository
return SubdivisionRepositoryInterface