Exemplo n.º 1
0
 /**
  * @test
  * @group unit
  */
 public function it_cancels_an_order()
 {
     $this->mockJsonResponses([[]]);
     $this->mockRequests();
     $order = new Order($this->client);
     $orderCode = 175936509216;
     $response = $order->cancel($orderCode);
     $request = $this->getLastRequest();
     $this->assertEquals('DELETE', $request->getMethod(), 'The request method should be DELETE.');
     $this->assertStringEndsWith((string) $orderCode, $request->getUri()->getPath(), 'The order code should be in the URL.');
 }