Example #1
0
 public function testGetPaymentMethod()
 {
     $expected = new PaymentMethod();
     $response = $this->getMock(ResponseInterface::class);
     $this->http->expects($this->any())->method('get')->with('/v2/payment-methods/PAYMENT_METHOD_ID', ['foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->any())->method('toPaymentMethod')->with($response)->willReturn($expected);
     $actual = $this->client->getPaymentMethod('PAYMENT_METHOD_ID', ['foo' => 'bar']);
     $this->assertSame($expected, $actual);
 }