/**
  * @covers ::match
  *
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setCountryCode
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setAdministrativeArea
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setLocality
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setDependentLocality
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setIncludedPostalCodes
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setExcludedPostalCodes
  * @uses \CommerceGuys\Zone\PostalCodeHelper
  * @dataProvider addressProvider
  */
 public function testMatch($address, $expectedResult)
 {
     $this->zoneMember->setCountryCode('CN');
     $this->zoneMember->setAdministrativeArea('CN-13');
     $this->zoneMember->setLocality('CN-13-e8dfb8');
     $this->zoneMember->setDependentLocality('CN-13-e8dfb8-269b0a');
     $this->zoneMember->setIncludedPostalCodes('123456');
     $this->assertEquals($expectedResult, $this->zoneMember->match($address));
 }
Пример #2
0
 /**
  * @covers ::match
  *
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setCountryCode
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setAdministrativeArea
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setLocality
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setDependentLocality
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setIncludedPostalCodes
  * @uses \CommerceGuys\Zone\Model\ZoneMemberCountry::setExcludedPostalCodes
  * @uses \CommerceGuys\Zone\PostalCodeHelper
  * @dataProvider addressProvider
  */
 public function testMatch($address, $expectedResult)
 {
     $this->zoneMember->setCountryCode('CN');
     $this->zoneMember->setAdministrativeArea('Hebei Sheng');
     $this->zoneMember->setLocality('Handan Shi');
     $this->zoneMember->setDependentLocality('Ci Xian');
     $this->zoneMember->setIncludedPostalCodes('123456');
     $this->assertEquals($expectedResult, $this->zoneMember->match($address));
 }