You are here

public function LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable in Lingotek Translation 8

Tests that if debug is not enabled, metadata tab is not available.

File

src/Tests/Form/LingotekMetadataEditFormTest.php, line 63

Class

LingotekMetadataEditFormTest
Tests the Lingotek metadata form.

Namespace

Drupal\lingotek\Tests\Form

Code

public function testMetadataLocalTaskNotAvailable() {

  // Create a node.
  $edit = array();
  $edit['title[0][value]'] = 'Llamas are cool';
  $edit['body[0][value]'] = 'Llamas are very cool';
  $edit['langcode[0][value]'] = 'en';
  $edit['lingotek_translation_profile'] = 'automatic';
  $this
    ->drupalPostForm('node/add/article', $edit, t('Save and publish'));
  $this
    ->assertUrl('/node/1', [], 'Node has been created.');

  // The metadata local task should not be visible.
  $this
    ->assertNoLink(t('Lingotek Metadata'));
}