Skip to content

Commit 0e96979

Browse files
Merge pull request #130 from Smartling/release-3-9-1
release 3.9.1
2 parents def7ee6 + 4d9d4e8 commit 0e96979

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "smartling/api-sdk-php",
3+
"version": "3.9.1",
34
"type": "library",
45
"description": "PHP library to communicate with SmartlingAPI",
56
"keywords": [
@@ -14,6 +15,7 @@
1415
"require": {
1516
"psr/log": "~1.0",
1617
"php": ">=5.5",
18+
"ext-json": "*",
1719
"guzzlehttp/guzzle": "~6"
1820
},
1921
"require-dev": {

src/BaseApiAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract class BaseApiAbstract
2323

2424
const CLIENT_LIB_ID_SDK = 'smartling-api-sdk-php';
2525

26-
const CLIENT_LIB_ID_VERSION = '3.9.0';
26+
const CLIENT_LIB_ID_VERSION = '3.9.1';
2727

2828
const CLIENT_USER_AGENT_EXTENSION = '(no extensions)';
2929

tests/unit/BaseApiAbstractTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public function testNoUserAgentExtensions()
2525
$instance = FileApi::create($this->authProvider, 'test');
2626
$http_client = $this->invokeMethod($instance, 'getHttpClient');
2727

28-
$this->assertTrue(
28+
$this->assertNotFalse(
2929
\strpos(
3030
$http_client->getConfig()['headers']['User-Agent'],
31-
'smartling-api-sdk-php/3.9.0 (no extensions) GuzzleHttp/6'
32-
) !== FALSE
31+
'smartling-api-sdk-php/3.9.1 (no extensions) GuzzleHttp/6'
32+
)
3333
);
3434
}
3535

@@ -44,11 +44,11 @@ public function testCurrentClientIdAndVersionSpecifiedUserAgentExtensionNotSpeci
4444
$instance = FileApi::create($this->authProvider, 'test');
4545
$http_client = $this->invokeMethod($instance, 'getHttpClient');
4646

47-
$this->assertTrue(
47+
$this->assertNotFalse(
4848
\strpos(
4949
$http_client->getConfig()['headers']['User-Agent'],
5050
'php-connector/1.2.3 (no extensions) GuzzleHttp/6'
51-
) !== FALSE
51+
)
5252
);
5353
}
5454

@@ -64,11 +64,11 @@ public function testClientIdAndClientVersionAndUserAgentExtensionsSpecified()
6464
$instance = FileApi::create($this->authProvider, 'test');
6565
$http_client = $this->invokeMethod($instance, 'getHttpClient');
6666

67-
$this->assertTrue(
67+
$this->assertNotFalse(
6868
\strpos(
6969
$http_client->getConfig()['headers']['User-Agent'],
7070
'php-connector/1.2.3 dependency-1/version-1 dependency-2/version-2 GuzzleHttp/6'
71-
) !== FALSE
71+
)
7272
);
7373
}
7474
}

tests/unit/FileApiTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function testUploadFile()
120120
],
121121
[
122122
'name' => 'smartling.client_lib_id',
123-
'contents' => '{"client":"smartling-api-sdk-php","version":"3.9.0"}',
123+
'contents' => '{"client":"smartling-api-sdk-php","version":"3.9.1"}',
124124
],
125125
[
126126
'name' => 'localeIdsToAuthorize[]',
@@ -148,7 +148,7 @@ public function testUploadFile()
148148

149149
$params = new UploadFileParameters();
150150
$params->setAuthorized(true);
151-
$params->setLocalesToApprove('es');
151+
$params->setLocalesToApprove(['es']);
152152
$params->setNamespace('namespace_for_deduplication');
153153

154154
$this->object->uploadFile('tests/resources/test.xml', 'test.xml', 'xml', $params);
@@ -171,7 +171,7 @@ public function testFileUploadParams()
171171
$exportedSettings = $fileUploadParams->exportToArray();
172172
$this->assertEquals($exportedSettings['authorize'], true);
173173

174-
$fileUploadParams->setLocalesToApprove('locale');
174+
$fileUploadParams->setLocalesToApprove(['locale']);
175175

176176
$fileUploadParams->setAuthorized(false);
177177
$exportedSettings = $fileUploadParams->exportToArray();

0 commit comments

Comments
 (0)