You are here

public function ContextTest::testSmartlingContextDebuggerShowContext in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Functional/ContextTest.php \Drupal\Tests\tmgmt_smartling\Functional\ContextTest::testSmartlingContextDebuggerShowContext()

Test Smartling context debugger: show context.

File

tests/src/Functional/ContextTest.php, line 67

Class

ContextTest
Context tests.

Namespace

Drupal\Tests\tmgmt_smartling\Functional

Code

public function testSmartlingContextDebuggerShowContext() {
  if (!empty($this->smartlingPluginProviderSettings)) {
    global $base_url;
    $this
      ->drupalPostForm('admin/tmgmt/smartling-context-debug', [
      'do_direct_output' => TRUE,
      'url' => $base_url . '/node/' . $this->testNodeId,
    ], t('Test context'));
    $this
      ->assertText($this->testNodeTitle);
    $this
      ->assertText($this->testNodeBody);
    $this
      ->drupalGet('admin/reports/dblog');
  }
  else {
    $this
      ->fail("Smartling settings file for simpletests not found.");
  }
}