コード例 #1
0
ファイル: UserTest.php プロジェクト: seegno/uphold-sdk-php
 /**
  * @test
  */
 public function shouldRevokeToken()
 {
     $bearerToken = 'foobar';
     $expectedResult = 'qux';
     $client = $this->getUpholdClientMock();
     $client->expects($this->once())->method('getOption')->with('bearer')->will($this->returnValue($bearerToken));
     $client->expects($this->once())->method('delete')->with(sprintf('/me/tokens/%s', $bearerToken))->will($this->returnValue($expectedResult));
     $user = new User($client, array('username' => 'foobar'));
     $this->assertEquals($expectedResult, $user->revokeToken());
 }