PHP Class CommerceGuys\Addressing\Tests\Repository\ZoneMatcherTest

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

Protected Properties

Property Type Description
$matcher CommerceGuys\Zone\Matcher\ZoneMatcher The zone matcher.
$zones array Used for constructing the mocks.

Public Methods

Method Description
setUp ( )
testConstructor ( )
testMatch ( )
testMatchAll ( )

Protected Methods

Method Description
getZone ( string $id, integer $priority, boolean $match ) : Zone Returns a mock zone based on the provided data.

Method Details

getZone() protected method

Returns a mock zone based on the provided data.
protected getZone ( string $id, integer $priority, boolean $match ) : Zone
$id string The zone id.
$priority integer The zone priority.
$match boolean Whether the zone should match.
return CommerceGuys\Zone\Model\Zone

setUp() public method

public setUp ( )

testConstructor() public method

public testConstructor ( )

testMatch() public method

public testMatch ( )

testMatchAll() public method

public testMatchAll ( )

Property Details

$matcher protected property

The zone matcher.
protected ZoneMatcher,CommerceGuys\Zone\Matcher $matcher
return CommerceGuys\Zone\Matcher\ZoneMatcher

$zones protected property

Used for constructing the mocks.
protected array $zones
return array