diff --git a/composer.lock b/composer.lock index 28bc89f..b848e2c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "20f62305d81e58cd6251e89716018c86", + "content-hash": "e7f659e3b8b0abfb9f1c305783dcebf7", "packages": [ { "name": "psr/log", @@ -55,11 +55,11 @@ }, { "name": "smartling/api-sdk-php", - "version": "3.5.3", + "version": "3.6.0", "dist": { "type": "path", "url": "api-sdk-php", - "reference": "5a335e44d744aad2110713b3440ac723cfba634c", + "reference": "32cbe9078f70b6c17f27cab9857e910b20ba8ea7", "shasum": null }, "require": { diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 9c65c38..5b2e2a4 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -50,12 +50,12 @@ }, { "name": "smartling/api-sdk-php", - "version": "3.5.3", - "version_normalized": "3.5.3.0", + "version": "3.6.0", + "version_normalized": "3.6.0.0", "dist": { "type": "path", "url": "api-sdk-php", - "reference": "5a335e44d744aad2110713b3440ac723cfba634c", + "reference": "32cbe9078f70b6c17f27cab9857e910b20ba8ea7", "shasum": null }, "require": { diff --git a/vendor/smartling/api-sdk-php/examples/audit-log-example.php b/vendor/smartling/api-sdk-php/examples/audit-log-example.php new file mode 100644 index 0000000..93ed270 --- /dev/null +++ b/vendor/smartling/api-sdk-php/examples/audit-log-example.php @@ -0,0 +1,198 @@ +setSearchQuery('foo:bar') + ->setOffset(0) + ->setLimit(100) + ->setSort('time', \Smartling\AuditLog\Params\SearchRecordParameters::ORDER_DESC); + + $response = $auditLog->searchProjectLevelLogRecord($searchParams); + } catch (\Smartling\Exceptions\SmartlingApiException $e) { + var_dump($e->getErrors()); + } + + $et = microtime(true); + $time = $et - $st; + + echo vsprintf('Request took %s seconds.%s', [round($time, 3), "\n\r"]); + + if (!empty($response)) { + var_dump($response); + } + + return $response; +} + +/** + * @param \Smartling\AuthApi\AuthApiInterface $authProvider + * @param string $projectId + * @param string $accountUid + * @return bool + */ +function searchAccountLevelLogRecordDemo($authProvider, $projectId, $accountUid) +{ + $response = false; + $auditLog = \Smartling\AuditLog\AuditLogApi::create($authProvider, $projectId); + $st = microtime(true); + + try { + $searchParams = (new \Smartling\AuditLog\Params\SearchRecordParameters()) + ->setSearchQuery('foo:bar') + ->setOffset(0) + ->setLimit(100) + ->setSort('time', \Smartling\AuditLog\Params\SearchRecordParameters::ORDER_DESC); + + $response = $auditLog->searchAccountLevelLogRecord($accountUid, $searchParams); + } catch (\Smartling\Exceptions\SmartlingApiException $e) { + var_dump($e->getErrors()); + } + + $et = microtime(true); + $time = $et - $st; + + echo vsprintf('Request took %s seconds.%s', [round($time, 3), "\n\r"]); + + if (!empty($response)) { + var_dump($response); + } + + return $response; +} + +/** + * @param \Smartling\AuthApi\AuthApiInterface $authProvider + * @param string $projectId + * @return bool + */ +function createProjectLevelLogRecordDemo($authProvider, $projectId) +{ + $response = false; + $auditLog = \Smartling\AuditLog\AuditLogApi::create($authProvider, $projectId); + $st = microtime(true); + + try { + $createParams = (new \Smartling\AuditLog\Params\CreateRecordParameters()) + ->setBucket("myBucket") + ->setTime(time()) + ->setActionType(\Smartling\AuditLog\Params\CreateRecordParameters::ACTION_TYPE_UPLOAD) + ->setUserId("myUserId") + ->setDescription("myDescription") + ->setCustomField("foo", "bar"); + + $response = $auditLog->createProjectLevelLogRecord($createParams); + } catch (\Smartling\Exceptions\SmartlingApiException $e) { + var_dump($e->getErrors()); + } + + $et = microtime(true); + $time = $et - $st; + + echo vsprintf('Request took %s seconds.%s', [round($time, 3), "\n\r"]); + + if (!empty($response)) { + var_dump($response); + } + + return $response; +} + +/** + * @param \Smartling\AuthApi\AuthApiInterface $authProvider + * @param string $projectId + * @param string $accountUid + * @return bool + */ +function createAccountLevelLogRecordDemo($authProvider, $projectId, $accountUid) +{ + $response = false; + $auditLog = \Smartling\AuditLog\AuditLogApi::create($authProvider, $projectId); + $st = microtime(true); + + try { + $createParams = (new \Smartling\AuditLog\Params\CreateRecordParameters()) + ->setBucket("myBucket") + ->setTime(time()) + ->setActionType(\Smartling\AuditLog\Params\CreateRecordParameters::ACTION_TYPE_UPLOAD) + ->setUserId("myUserId") + ->setDescription("myDescription") + ->setCustomField("foo", "bar"); + + $response = $auditLog->createAccountLevelLogRecord($accountUid, $createParams); + } catch (\Smartling\Exceptions\SmartlingApiException $e) { + var_dump($e->getErrors()); + } + + $et = microtime(true); + $time = $et - $st; + + echo vsprintf('Request took %s seconds.%s', [round($time, 3), "\n\r"]); + + if (!empty($response)) { + var_dump($response); + } + + return $response; +} + +$response = searchProjectLevelLogRecordDemo($authProvider, $projectId); +$response = searchAccountLevelLogRecordDemo($authProvider, $projectId, $accountUid); +$response = createProjectLevelLogRecordDemo($authProvider, $projectId); +$response = createAccountLevelLogRecordDemo($authProvider, $projectId, $accountUid); diff --git a/vendor/smartling/api-sdk-php/src/AuditLog/AuditLogApi.php b/vendor/smartling/api-sdk-php/src/AuditLog/AuditLogApi.php new file mode 100755 index 0000000..495ef41 --- /dev/null +++ b/vendor/smartling/api-sdk-php/src/AuditLog/AuditLogApi.php @@ -0,0 +1,79 @@ +setBaseUrl(rtrim($service_url, '/')); + } + + public static function create(AuthApiInterface $authProvider, $projectId, LoggerInterface $logger = null) + { + + $client = self::initializeHttpClient(self::ENDPOINT_URL); + + $instance = new self($projectId, $client, $logger, self::ENDPOINT_URL); + $instance->setAuth($authProvider); + + return $instance; + } + + public function createProjectLevelLogRecord(CreateRecordParameters $createRecordRecommendedParameters) { + $requestData = $this->getDefaultRequestData('json', $createRecordRecommendedParameters->exportToArray()); + $endpoint = vsprintf(self::PROJECT_LEVEL_URL, [ + $this->getProjectId(), + ]); + + return $this->sendRequest($endpoint, $requestData, static::HTTP_METHOD_POST); + } + + public function createAccountLevelLogRecord($accountUid, CreateRecordParameters $createRecordRecommendedParameters) { + $requestData = $this->getDefaultRequestData('json', $createRecordRecommendedParameters->exportToArray()); + $endpoint = vsprintf(self::ACCOUNT_LEVEL_URL, [ + $accountUid, + ]); + + return $this->sendRequest($endpoint, $requestData, static::HTTP_METHOD_POST); + } + + public function searchProjectLevelLogRecord(SearchRecordParameters $searchParameters) { + $requestData = $this->getDefaultRequestData('query', $searchParameters->exportToArray()); + $endpoint = vsprintf(self::PROJECT_LEVEL_URL, [ + $this->getProjectId(), + ]); + + return $this->sendRequest($endpoint, $requestData, static::HTTP_METHOD_GET); + } + + public function searchAccountLevelLogRecord($accountUid, SearchRecordParameters $searchParameters) { + $requestData = $this->getDefaultRequestData('query', $searchParameters->exportToArray()); + $endpoint = vsprintf(self::ACCOUNT_LEVEL_URL, [ + $accountUid, + ]); + + return $this->sendRequest($endpoint, $requestData, static::HTTP_METHOD_GET); + } + +} diff --git a/vendor/smartling/api-sdk-php/src/AuditLog/Params/CreateRecordParameters.php b/vendor/smartling/api-sdk-php/src/AuditLog/Params/CreateRecordParameters.php new file mode 100755 index 0000000..9c1d039 --- /dev/null +++ b/vendor/smartling/api-sdk-php/src/AuditLog/Params/CreateRecordParameters.php @@ -0,0 +1,73 @@ +setTime(time()); + } + + public function setBucket($bucket) { + $this->set('bucket', (string) $bucket); + + return $this; + } + + public function setTime($timeStamp) { + if (!is_int($timeStamp)) { + throw new InvalidArgumentException('Time value must be a timestamp.'); + } + + $this->set('time', date('Y-m-d\TH:i:s\Z', $timeStamp)); + + return $this; + } + + public function setActionType($actionType) { + $allowedActionTypes = [ + CreateRecordParameters::ACTION_TYPE_UPLOAD, + CreateRecordParameters::ACTION_TYPE_DOWNLOAD, + CreateRecordParameters::ACTION_TYPE_CANCEL, + CreateRecordParameters::ACTION_TYPE_DELETE, + CreateRecordParameters::ACTION_TYPE_LOCK_FIELDS, + CreateRecordParameters::ACTION_TYPE_UPDATE_SETTINGS, + ]; + + if (!in_array($actionType, $allowedActionTypes)) { + throw new InvalidArgumentException('Allowed action types are: ' . implode(', ', $allowedActionTypes)); + } + + $this->set('action_type', $actionType); + + return $this; + } + + public function setUserId($user_id) { + $this->set('user_id', (string) $user_id); + + return $this; + } + + public function setDescription($description) { + $this->set('description', (string) $description); + + return $this; + } + + public function setCustomField($key, $value) { + $this->set($key, $value); + + return $this; + } +} diff --git a/vendor/smartling/api-sdk-php/src/AuditLog/Params/SearchRecordParameters.php b/vendor/smartling/api-sdk-php/src/AuditLog/Params/SearchRecordParameters.php new file mode 100755 index 0000000..1debaab --- /dev/null +++ b/vendor/smartling/api-sdk-php/src/AuditLog/Params/SearchRecordParameters.php @@ -0,0 +1,59 @@ +setOffset(0); + $this->setLimit(10); + $this->setSort("_seq_no", SearchRecordParameters::ORDER_DESC); + } + + public function setSearchQuery($searchQuery) { + $this->set('q', (string) $searchQuery); + + return $this; + } + + public function setOffset($offset) { + if (!is_int($offset) || $offset < 0) { + throw new InvalidArgumentException('Offset value must be grater or equal to zero.'); + } + + $this->set('offset', $offset); + + return $this; + } + + public function setLimit($limit) { + if (!is_int($limit) || $limit < 1) { + throw new InvalidArgumentException('Limit value must be grater or equal to one.'); + } + + $this->set('limit', $limit); + + return $this; + } + + public function setSort($field, $order) { + $allowedSortOrders = [ + SearchRecordParameters::ORDER_DESC, + SearchRecordParameters::ORDER_ASC + ]; + + if (!in_array($order, $allowedSortOrders)) { + throw new InvalidArgumentException('Allowed sort orders are: ' . implode(', ', $allowedSortOrders)); + } + + $this->set('sort', "$field:$order"); + + return $this; + } +} diff --git a/vendor/smartling/api-sdk-php/src/Batch/BatchApi.php b/vendor/smartling/api-sdk-php/src/Batch/BatchApi.php index e10de11..591c91a 100755 --- a/vendor/smartling/api-sdk-php/src/Batch/BatchApi.php +++ b/vendor/smartling/api-sdk-php/src/Batch/BatchApi.php @@ -18,10 +18,6 @@ class BatchApi extends BaseApiAbstract { const ACTION_EXECUTE = 'execute'; - - /** - * @TODO: change this to production url. - */ const ENDPOINT_URL = 'https://api.smartling.com/jobs-batch-api/v1/projects'; /** diff --git a/vendor/smartling/api-sdk-php/tests/functional/AuditLogApiFunctionalTest.php b/vendor/smartling/api-sdk-php/tests/functional/AuditLogApiFunctionalTest.php new file mode 100755 index 0000000..1af0c2a --- /dev/null +++ b/vendor/smartling/api-sdk-php/tests/functional/AuditLogApiFunctionalTest.php @@ -0,0 +1,194 @@ +fail('Missing required parameters'); + } + + $authProvider = AuthTokenProvider::create($userIdentifier, $userSecretKey); + $this->auditLogApi = AuditLogApi::create($authProvider, $projectId); + } + + public function testCreateProjectLevelLogRecord() + { + try { + $user_id = uniqid(); + $params = (new CreateRecordParameters()) + ->setBucket('test_bucket_name') + ->setTime(time()) + ->setActionType(CreateRecordParameters::ACTION_TYPE_UPLOAD) + ->setUserId($user_id) + ->setDescription("test_description") + ->setCustomField("my_custom_field", "test_custom_field_value"); + + $result = $this->auditLogApi->createProjectLevelLogRecord($params); + + $this->assertArrayHasKey('_index', $result); + $this->assertArrayHasKey('_type', $result); + $this->assertArrayHasKey('_id', $result); + $this->assertArrayHasKey('_seq_no', $result); + } catch (SmartlingApiException $e) { + $result = false; + } + + return $result; + } + + public function testCreateAccountLevelLogRecord() + { + try { + $user_id = uniqid(); + $params = (new CreateRecordParameters()) + ->setBucket('test_bucket_name') + ->setTime(time()) + ->setActionType(CreateRecordParameters::ACTION_TYPE_UPLOAD) + ->setUserId($user_id) + ->setDescription("test_description") + ->setCustomField("my_custom_field", "test_custom_field_value"); + + $result = $this->auditLogApi->createAccountLevelLogRecord(getenv("account_uid"), $params); + + $this->assertArrayHasKey('_index', $result); + $this->assertArrayHasKey('_type', $result); + $this->assertArrayHasKey('_id', $result); + $this->assertArrayHasKey('_seq_no', $result); + } catch (SmartlingApiException $e) { + $result = false; + } + + return $result; + } + + public function testSearchProjectLevelLogRecord() + { + try { + $user_id = uniqid(); + + $params = (new CreateRecordParameters()) + ->setBucket('test_bucket_name') + ->setTime(time()) + ->setActionType(CreateRecordParameters::ACTION_TYPE_UPLOAD) + ->setUserId($user_id) + ->setDescription("test_description") + ->setCustomField("my_custom_field", "test_custom_field_value"); + + $this->auditLogApi->createProjectLevelLogRecord($params); + + sleep(1); + + $params = (new SearchRecordParameters()) + ->setSearchQuery("user_id:$user_id"); + + $result = $this->auditLogApi->searchProjectLevelLogRecord($params); + + $this->assertArrayHasKey('totalCount', $result); + $this->assertArrayHasKey('items', $result); + + $this->assertEquals($result['totalCount'], 1); + $this->assertEquals(count($result['items']), 1); + + $this->assertArrayHasKey('time', $result['items'][0]); + $this->assertArrayHasKey('bucket', $result['items'][0]); + $this->assertArrayHasKey('action_type', $result['items'][0]); + $this->assertArrayHasKey('user_id', $result['items'][0]); + $this->assertArrayHasKey('description', $result['items'][0]); + $this->assertArrayHasKey('my_custom_field', $result['items'][0]); + $this->assertArrayHasKey('ip', $result['items'][0]); + $this->assertArrayHasKey('host', $result['items'][0]); + $this->assertArrayHasKey('gateway_request_id', $result['items'][0]); + $this->assertArrayHasKey('browser', $result['items'][0]); + $this->assertArrayHasKey('account_uid', $result['items'][0]); + $this->assertArrayHasKey('project_uid', $result['items'][0]); + + $this->assertEquals($result['items'][0]['bucket'], 'test_bucket_name'); + $this->assertEquals($result['items'][0]['action_type'], CreateRecordParameters::ACTION_TYPE_UPLOAD); + $this->assertEquals($result['items'][0]['user_id'], $user_id); + $this->assertEquals($result['items'][0]['description'], 'test_description'); + $this->assertEquals($result['items'][0]['my_custom_field'], 'test_custom_field_value'); + $this->assertEquals($result['items'][0]['account_uid'], getenv("account_uid")); + $this->assertEquals($result['items'][0]['project_uid'], getenv('project_id')); + } catch (SmartlingApiException $e) { + $result = false; + } + + return $result; + } + + public function testSearchAccountLevelLogRecord() + { + try { + $user_id = uniqid(); + + $params = (new CreateRecordParameters()) + ->setBucket('test_bucket_name') + ->setTime(time()) + ->setActionType(CreateRecordParameters::ACTION_TYPE_UPLOAD) + ->setUserId($user_id) + ->setDescription("test_description") + ->setCustomField("my_custom_field", "test_custom_field_value"); + + $this->auditLogApi->createAccountLevelLogRecord(getenv("account_uid"), $params); + + sleep(1); + + $params = (new SearchRecordParameters()) + ->setSearchQuery("user_id:$user_id"); + + $result = $this->auditLogApi->searchAccountLevelLogRecord(getenv("account_uid"), $params); + + $this->assertArrayHasKey('totalCount', $result); + $this->assertArrayHasKey('items', $result); + + $this->assertEquals($result['totalCount'], 1); + $this->assertEquals(count($result['items']), 1); + + $this->assertArrayHasKey('time', $result['items'][0]); + $this->assertArrayHasKey('bucket', $result['items'][0]); + $this->assertArrayHasKey('action_type', $result['items'][0]); + $this->assertArrayHasKey('user_id', $result['items'][0]); + $this->assertArrayHasKey('description', $result['items'][0]); + $this->assertArrayHasKey('my_custom_field', $result['items'][0]); + $this->assertArrayHasKey('ip', $result['items'][0]); + $this->assertArrayHasKey('host', $result['items'][0]); + $this->assertArrayHasKey('gateway_request_id', $result['items'][0]); + $this->assertArrayHasKey('browser', $result['items'][0]); + $this->assertArrayHasKey('account_uid', $result['items'][0]); + $this->assertArrayHasKey('project_uid', $result['items'][0]); + + $this->assertEquals($result['items'][0]['bucket'], 'test_bucket_name'); + $this->assertEquals($result['items'][0]['action_type'], CreateRecordParameters::ACTION_TYPE_UPLOAD); + $this->assertEquals($result['items'][0]['user_id'], $user_id); + $this->assertEquals($result['items'][0]['description'], 'test_description'); + $this->assertEquals($result['items'][0]['my_custom_field'], 'test_custom_field_value'); + $this->assertEquals($result['items'][0]['account_uid'], getenv("account_uid")); + $this->assertEquals($result['items'][0]['project_uid'], 'none'); + } catch (SmartlingApiException $e) { + $result = false; + } + + return $result; + } +} diff --git a/vendor/smartling/api-sdk-php/tests/unit/AuditLogApiTest.php b/vendor/smartling/api-sdk-php/tests/unit/AuditLogApiTest.php new file mode 100644 index 0000000..d3411c6 --- /dev/null +++ b/vendor/smartling/api-sdk-php/tests/unit/AuditLogApiTest.php @@ -0,0 +1,215 @@ +projectId, + ] + ); + + $createParams = (new CreateRecordParameters()) + ->setBucket("myBucket") + ->setTime(1234567890) + ->setActionType(CreateRecordParameters::ACTION_TYPE_UPLOAD) + ->setUserId("myUserId") + ->setDescription("myDescription") + ->setCustomField("my_custom_field", "foo"); + + $this->client->expects($this->any()) + ->method('request') + ->with('post', $endpointUrl, [ + 'headers' => [ + 'Accept' => 'application/json', + 'Authorization' => vsprintf('%s %s', [ + $this->authProvider->getTokenType(), + $this->authProvider->getAccessToken(), + ]), + ], + 'exceptions' => false, + 'json' => [ + 'time' => '2009-02-13T23:31:30Z', + 'bucket' => 'myBucket', + 'action_type' => CreateRecordParameters::ACTION_TYPE_UPLOAD, + 'user_id' => 'myUserId', + 'description' => 'myDescription', + 'my_custom_field' => 'foo', + ], + ]) + ->willReturn($this->responseMock); + + $this->object->createProjectLevelLogRecord($createParams); + } + + /** + * @covers \Smartling\AuditLog\AuditLogApi::createAccountLevelLogRecord + */ + public function testCreateAccountLevelLogRecord() + { + $accountUid = "account_uid"; + $endpointUrl = vsprintf( + '%s/accounts/%s/logs', + [ + AuditLogApi::ENDPOINT_URL, + $accountUid, + ] + ); + + $createParams = (new CreateRecordParameters()) + ->setBucket("myBucket") + ->setTime(1234567890) + ->setActionType(CreateRecordParameters::ACTION_TYPE_DOWNLOAD) + ->setUserId("myUserId") + ->setDescription("myDescription") + ->setCustomField("my_custom_field", "foo"); + + $this->client->expects($this->any()) + ->method('request') + ->with('post', $endpointUrl, [ + 'headers' => [ + 'Accept' => 'application/json', + 'Authorization' => vsprintf('%s %s', [ + $this->authProvider->getTokenType(), + $this->authProvider->getAccessToken(), + ]), + ], + 'exceptions' => false, + 'json' => [ + 'time' => '2009-02-13T23:31:30Z', + 'bucket' => 'myBucket', + 'action_type' => CreateRecordParameters::ACTION_TYPE_DOWNLOAD, + 'user_id' => 'myUserId', + 'description' => 'myDescription', + 'my_custom_field' => 'foo', + ], + ]) + ->willReturn($this->responseMock); + + $this->object->createAccountLevelLogRecord($accountUid, $createParams); + } + + /** + * @covers \Smartling\AuditLog\AuditLogApi::searchProjectLevelLogRecord + */ + public function testSearchProjectLevelLogRecord() + { + $endpointUrl = vsprintf( + '%s/projects/%s/logs', + [ + AuditLogApi::ENDPOINT_URL, + $this->projectId, + ] + ); + + $createParams = (new SearchRecordParameters()) + ->setSearchQuery("foo:bar") + ->setOffset(1) + ->setLimit(100) + ->setSort("baz", SearchRecordParameters::ORDER_ASC); + + $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' => [ + 'q' => 'foo:bar', + 'offset' => 1, + 'limit' => 100, + 'sort' => 'baz:' . SearchRecordParameters::ORDER_ASC, + ], + ]) + ->willReturn($this->responseMock); + + $this->object->searchProjectLevelLogRecord($createParams); + } + + /** + * @covers \Smartling\AuditLog\AuditLogApi::searchAccountLevelLogRecord + */ + public function testSearchAccountLevelLogRecord() + { + $accountUid = "account_uid"; + $endpointUrl = vsprintf( + '%s/accounts/%s/logs', + [ + AuditLogApi::ENDPOINT_URL, + $accountUid, + ] + ); + + $createParams = (new SearchRecordParameters()) + ->setSearchQuery("foo:bar") + ->setOffset(1) + ->setLimit(100) + ->setSort("baz", SearchRecordParameters::ORDER_ASC); + + $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' => [ + 'q' => 'foo:bar', + 'offset' => 1, + 'limit' => 100, + 'sort' => 'baz:' . SearchRecordParameters::ORDER_ASC, + ], + ]) + ->willReturn($this->responseMock); + + $this->object->searchAccountLevelLogRecord($accountUid, $createParams); + } + + protected function setUp() + { + parent::setUp(); + $this->prepareAuditLogApiMock(); + } + + private function prepareAuditLogApiMock() + { + $this->object = $this->getMockBuilder('Smartling\AuditLog\AuditLogApi') + ->setMethods(NULL) + ->setConstructorArgs([ + $this->projectId, + $this->client, + null, + AuditLogApi::ENDPOINT_URL, + ]) + ->getMock(); + + $this->invokeMethod( + $this->object, + 'setAuth', + [ + $this->authProvider + ] + ); + } +}