예제 #1
0
 /**
  * Set up test case.
  */
 public function setUp()
 {
     parent::setUp();
     $this->response = new \stdClass();
     $this->response->InvoiceNo = 1234;
     $this->response->NewInvoiceNo = 4321;
     $this->invoiceId = 4321;
     $this->countryCode = Country::NORWAY;
     $this->client = $this->getMockBuilder('\\Collector\\Client')->disableOriginalConstructor()->getMock();
     $this->client->expects($this->any())->method('call')->willReturnCallback(function ($method, $data) {
         $this->response->method = $method;
         $this->response->data = $data;
         return $this->response;
     });
     $this->invoiceService = new Invoice($this->client, $this->countryCode);
 }