public function FileApiTest::testConstructor in TMGMT Translator Smartling 8.2
Same name in this branch
- 8.2 api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testConstructor()
- 8.2 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testConstructor()
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testConstructor()
- 8.3 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testConstructor()
Tests constructor.
@covers \Smartling\File\FileApi::__construct
@dataProvider constructorDataProvider
Parameters
string $projectId: Project Id string.
\GuzzleHttp\ClientInterface $client: Mock of Guzzle http client instance.
string|null $expected_base_url: Base Url string that will be used as based url.
File
- vendor/
smartling/ api-sdk-php/ tests/ unit/ FileApiTest.php, line 63
Class
- FileApiTest
- Test class for Smartling\File\FileApi.
Namespace
Smartling\Tests\UnitCode
public function testConstructor($projectId, $client, $expected_base_url) {
$fileApi = new FileApi($projectId, $client, null, $expected_base_url);
$this
->assertEquals(rtrim($expected_base_url, '/') . '/' . $projectId, $this
->invokeMethod($fileApi, 'getBaseUrl'));
$this
->assertEquals($projectId, $this
->invokeMethod($fileApi, 'getProjectId'));
$this
->assertEquals($client, $this
->invokeMethod($fileApi, 'getHttpClient'));
}