You are here

public function ContextTest::testSmartlingContextDebuggerShowContext in TMGMT Translator Smartling 8.2

Test Smartling context debugger: show context.

File

src/Tests/ContextTest.php, line 67

Class

ContextTest
Context tests.

Namespace

Drupal\tmgmt_smartling\Tests

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.");
  }
}