public function AuthApiTest::testAuthenticate in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.2 api-sdk-php/tests/unit/AuthApiTest.php \Smartling\Tests\AuthApiTest::testAuthenticate()
- 8.2 vendor/smartling/api-sdk-php/tests/unit/AuthApiTest.php \Smartling\Tests\AuthApiTest::testAuthenticate()
- 8.3 vendor/smartling/api-sdk-php/tests/unit/AuthApiTest.php \Smartling\Tests\AuthApiTest::testAuthenticate()
Test auth method.
File
- vendor/
smartling/ api-sdk-php/ tests/ unit/ AuthApiTest.php, line 39
Class
- AuthApiTest
- Test class for Smartling\AuthApi\AuthTokenProvider.
Namespace
Smartling\TestsCode
public function testAuthenticate() {
$endpointUrl = vsprintf('%s/authenticate', [
AuthTokenProvider::ENDPOINT_URL,
]);
$this->client
->expects(self::once())
->method('request')
->with('post', $endpointUrl, [
'headers' => [
'Accept' => 'application/json',
],
'exceptions' => false,
'json' => [
'userIdentifier' => 'SomeUserIdentifier',
'userSecret' => 'SomeSecretKey',
],
])
->willReturn($this->responseMock);
$this
->invokeMethod($this->object, 'authenticate');
}