CommerceGuys\Addressing\Tests\Repository\ZoneMatcherTest::getZone PHP Метод

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

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.
Результат CommerceGuys\Zone\Model\Zone
    protected function getZone($id, $priority, $match)
    {
        $zone = $this->getMockBuilder('CommerceGuys\\Zone\\Model\\Zone')->disableOriginalConstructor()->getMock();
        $zone->expects($this->any())->method('getId')->will($this->returnValue($id));
        $zone->expects($this->any())->method('getPriority')->will($this->returnValue($priority));
        $zone->expects($this->any())->method('match')->with($this->anything())->will($this->returnValue($match));
        return $zone;
    }