This is the response object from the VIES web service for validation of VAT numbers of companies registered in the European Union.
또한 보기: DragonBe\Vies\Exception
예제 #1
1
 public function testDefaultDateIsNow()
 {
     $vatResponse = new CheckVatResponse();
     $this->assertInstanceOf('\\DateTime', $vatResponse->getRequestDate());
     $this->assertSame(date('Y-m-dP'), $vatResponse->getRequestDate()->format('Y-m-dP'));
 }
예제 #2
1
파일: ViesTest.php 프로젝트: dragonbe/vies
 /**
  * @param \DragonBe\Vies\CheckVatResponse $response
  * @depends testSuccessVatNumberValidation
  * @covers \DragonBe\Vies\CheckVatResponse::toArray
  */
 public function testConvertObjectIntoArray($response)
 {
     $array = $response->toArray();
     $this->assertSame('BE', $array['countryCode']);
     $this->assertSame('0123.456.749', $array['vatNumber']);
     $this->assertSame('1983-06-24', $array['requestDate']);
     $this->assertSame('XYZ1234567890', $array['identifier']);
     $this->assertTrue($array['valid']);
     $this->assertEmpty($array['name']);
     $this->assertEmpty($array['address']);
 }