-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1248,6 +1248,94 @@ public function it_can_deleta_a_user() | |
$this->assertEmpty($response); | ||
} | ||
|
||
/** @test */ | ||
public function it_can_create_merchant_applications() | ||
{ | ||
$this->client->setAccessToken([ | ||
'access_token' => self::$access_token, | ||
'token_type' => 'Bearer', | ||
]); | ||
|
||
$this->client->setClient( | ||
$this->mock_http_client( | ||
$this->mockCreateMerchantApplicationResponse() | ||
) | ||
); | ||
|
||
$response = $this->client->createMerchantApplication( | ||
'AGGREGATOR', | ||
[ | ||
'https://example.com/callback', | ||
'https://example.com/callback2', | ||
], | ||
[ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
'WDJJHEBZ4X2LY', | ||
'some-open-id' | ||
); | ||
|
||
$this->assertArrayHasKey('client_name', $response); | ||
$this->assertArrayHasKey('contacts', $response); | ||
$this->assertArrayHasKey('redirect_uris', $response); | ||
} | ||
|
||
/** @test */ | ||
public function it_can_set_account_properties() | ||
{ | ||
$this->client->setAccessToken([ | ||
'access_token' => self::$access_token, | ||
'token_type' => 'Bearer', | ||
]); | ||
|
||
$this->client->setClient( | ||
$this->mock_http_client('') | ||
); | ||
|
||
$response = $this->client->setAccountProperties($this->mockSetAccountPropertiesParams()); | ||
|
||
$this->assertEmpty($response); | ||
} | ||
|
||
/** @test */ | ||
public function it_can_disable_account_properties() | ||
{ | ||
$this->client->setAccessToken([ | ||
'access_token' => self::$access_token, | ||
'token_type' => 'Bearer', | ||
]); | ||
|
||
$this->client->setClient( | ||
$this->mock_http_client( | ||
$this->mockUpdateOrdersResponse() | ||
) | ||
); | ||
|
||
$response = $this->client->disableAccountProperties(); | ||
|
||
$this->assertEmpty($response); | ||
} | ||
|
||
/** @test */ | ||
public function it_can_get_client_token() | ||
{ | ||
$this->client->setAccessToken([ | ||
'access_token' => self::$access_token, | ||
'token_type' => 'Bearer', | ||
]); | ||
|
||
$this->client->setClient( | ||
$this->mock_http_client( | ||
$this->mockGetClientTokenResponse() | ||
) | ||
); | ||
|
||
$response = $this->client->getClientToken(); | ||
|
||
$this->assertArrayHasKey('client_token', $response); | ||
} | ||
|
||
/** @test */ | ||
public function it_can_create_orders() | ||
{ | ||
|