public function BaseApiAbstractTest::testCurrentClientIdAndVersionSpecifiedUserAgentExtensionNotSpecified in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/tests/unit/BaseApiAbstractTest.php \Smartling\Tests\Unit\BaseApiAbstractTest::testCurrentClientIdAndVersionSpecifiedUserAgentExtensionNotSpecified()
Test custom client id and version in user agent.
File
- vendor/
smartling/ api-sdk-php/ tests/ unit/ BaseApiAbstractTest.php, line 39
Class
Namespace
Smartling\Tests\UnitCode
public function testCurrentClientIdAndVersionSpecifiedUserAgentExtensionNotSpecified() {
BaseApiAbstract::setCurrentClientId('php-connector');
BaseApiAbstract::setCurrentClientVersion('1.2.3');
$instance = FileApi::create($this->authProvider, 'test');
$http_client = $this
->invokeMethod($instance, 'getHttpClient');
$this
->assertTrue(strpos($http_client
->getConfig()['headers']['User-Agent'], 'php-connector/1.2.3 (no extensions) GuzzleHttp/6') !== FALSE);
}