You are here

protected function SmartlingTestBase::checkGeneratedFile in TMGMT Translator Smartling 8.2

Checks if generated file exists and correct.

Parameters

$fileName:

$nodeTitle:

9 calls to SmartlingTestBase::checkGeneratedFile()
BaseFlowTest::testUploadFileAndDownloadTranslation in src/Tests/BaseFlowTest.php
Test upload and download translation.
BaseFlowTest::testUploadXlfChangeToXmlDownloadXlf in src/Tests/BaseFlowTest.php
Test uploading/downloading xlf file: rely on file name in tmgmt_job.
BaseFlowTest::testUploadXmlChangeToXlfDownloadXml in src/Tests/BaseFlowTest.php
Test uploading/downloading xml file: rely on file name in tmgmt_job.
ContextTest::testSmartlingContextDebuggerSendContext in src/Tests/ContextTest.php
Test Smartling context debugger: send context.
PushBackControllerTest::testPushBackExistingJobWithoutFileUri in src/Tests/PushBackControllerTest.php
Push back existing job without file uri.

... See full list

File

src/Tests/SmartlingTestBase.php, line 192

Class

SmartlingTestBase
Basic tests for the Smartling translator.

Namespace

Drupal\tmgmt_smartling\Tests

Code

protected function checkGeneratedFile($fileName, $nodeTitle) {
  $url = \Drupal::service('stream_wrapper_manager')
    ->getViaUri(file_default_scheme() . "://tmgmt_sources/{$fileName}")
    ->getExternalUrl();
  $this
    ->drupalGet($url);
  $this
    ->assertResponse(200);
  $this
    ->assertRaw($nodeTitle);
}