getCountryCode() public method

Retrieves the two-character country code from a member of the European Union.
public getCountryCode ( ) : string
return string
示例#1
0
 /**
  * @dataProvider validationProvider
  */
 public function testCanCreateResponseWithArrayAtConstruct($validCheck)
 {
     $response = $this->createViesResponseArray($validCheck);
     $checkVatResponse = new CheckVatResponse($response);
     $this->assertSame($response['countryCode'], $checkVatResponse->getCountryCode());
     $this->assertSame($response['vatNumber'], $checkVatResponse->getVatNumber());
     $this->assertSame($response['requestDate'], $checkVatResponse->getRequestDate()->format(CheckVatResponse::VIES_DATETIME_FORMAT));
     $this->assertSame($response['valid'], $checkVatResponse->isValid());
     $this->assertSame($response['traderName'], $checkVatResponse->getName());
     $this->assertSame($response['traderAddress'], $checkVatResponse->getAddress());
     $this->assertSame($response['requestIdentifier'], $checkVatResponse->getIdentifier());
 }