You are here

public function ProgressTrackerApiTest::testDeleteRecord in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/tests/unit/ProgressTrackerApiTest.php \Smartling\Tests\Unit\ProgressTrackerApiTest::testDeleteRecord()

@covers \Smartling\ProgressTracker\ProgressTrackerApi::deleteRecord

File

vendor/smartling/api-sdk-php/tests/unit/ProgressTrackerApiTest.php, line 94

Class

ProgressTrackerApiTest
Test class for Smartling\ProgressTracker\ProgressTrackerApi.

Namespace

Smartling\Tests\Unit

Code

public function testDeleteRecord() {
  $spaceId = "space";
  $objectId = "object";
  $recordId = "record";
  $endpointUrl = vsprintf('%s/projects/%s/spaces/%s/objects/%s/records/%s', [
    ProgressTrackerApi::ENDPOINT_URL,
    $this->projectId,
    $spaceId,
    $objectId,
    $recordId,
  ]);
  $this->client
    ->expects($this
    ->any())
    ->method('request')
    ->with('delete', $endpointUrl, [
    'headers' => [
      'Accept' => 'application/json',
      'Authorization' => vsprintf('%s %s', [
        $this->authProvider
          ->getTokenType(),
        $this->authProvider
          ->getAccessToken(),
      ]),
    ],
    'exceptions' => false,
    'query' => [],
  ])
    ->willReturn($this->responseMock);
  $this->object
    ->deleteRecord($spaceId, $objectId, $recordId);
}