You are here

public function ContextTest::testSmartlingContextDebuggerShowContext in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 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' => 'https://www.smartling.com',
    ], t('Test context'));
    $this
      ->assertText("Move the World with Words");
    $this
      ->drupalGet('admin/reports/dblog');
  }
  else {
    $this
      ->fail("Smartling settings file for simpletests not found.");
  }
}