PHP Class CommerceGuys\Addressing\Tests\Formatter\DefaultFormatterTest

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\DefaultFormatter The formatter.
$subdivisionRepository SubdivisionRepositoryInterface The subdivision repository.

Public Methods

Method Description
setUp ( )
testAndorraAddress ( )
testConstructor ( )
testElSalvadorAddress ( )
testInvalidOption ( )
testLocale ( )
testOptions ( )
testTaiwanAddress ( )
testUnitedStatesIncompleteAddress ( )

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 ( )

testAndorraAddress() public method

public testAndorraAddress ( )

testConstructor() public method

public testConstructor ( )

testElSalvadorAddress() public method

testInvalidOption() public method

public testInvalidOption ( )

testLocale() public method

public testLocale ( )

testOptions() public method

public testOptions ( )

testTaiwanAddress() public method

public testTaiwanAddress ( )

testUnitedStatesIncompleteAddress() 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 DefaultFormatter,CommerceGuys\Addressing\Formatter $formatter
return CommerceGuys\Addressing\Formatter\DefaultFormatter

$subdivisionRepository protected property

The subdivision repository.
protected SubdivisionRepositoryInterface $subdivisionRepository
return SubdivisionRepositoryInterface