public function ProgressTrackerApiTest::testGetToken in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/tests/unit/ProgressTrackerApiTest.php \Smartling\Tests\Unit\ProgressTrackerApiTest::testGetToken()
@covers \Smartling\ProgressTracker\ProgressTrackerApi::getToken
File
- vendor/
smartling/ api-sdk-php/ tests/ unit/ ProgressTrackerApiTest.php, line 16
Class
- ProgressTrackerApiTest
- Test class for Smartling\ProgressTracker\ProgressTrackerApi.
Namespace
Smartling\Tests\UnitCode
public function testGetToken() {
$accountUid = "account_uid";
$endpointUrl = vsprintf('%s/accounts/%s/token', [
ProgressTrackerApi::ENDPOINT_URL,
$accountUid,
]);
$this->client
->expects($this
->any())
->method('request')
->with('get', $endpointUrl, [
'headers' => [
'Accept' => 'application/json',
'Authorization' => vsprintf('%s %s', [
$this->authProvider
->getTokenType(),
$this->authProvider
->getAccessToken(),
]),
],
'exceptions' => false,
'query' => [],
])
->willReturn($this->responseMock);
$this->object
->getToken($accountUid);
}