예제 #1
0
 public function testGetCurrentAuthorization()
 {
     $expected = ['key' => 'value'];
     $response = $this->getMock(ResponseInterface::class);
     $this->http->expects($this->any())->method('get')->with('/v2/user/auth', ['foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->any())->method('toData')->with($response)->willReturn($expected);
     $actual = $this->client->getCurrentAuthorization(['foo' => 'bar']);
     $this->assertEquals($expected, $actual);
 }