Example #1
0
 public function testCommitBuy()
 {
     $buy = Buy::reference('ACCOUNT_ID', 'BUY_ID');
     $response = $this->getMock(ResponseInterface::class);
     $this->http->expects($this->once())->method('post')->with('/v2/accounts/ACCOUNT_ID/buys/BUY_ID/commit', ['foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->once())->method('toBuy')->with($response, $buy);
     $this->client->commitBuy($buy, ['foo' => 'bar']);
 }