You are here

public function LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  2. 4.0.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  3. 3.0.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  4. 3.1.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  5. 3.2.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  6. 3.3.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  7. 3.4.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  8. 3.5.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  9. 3.7.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()
  10. 3.8.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskNotAvailable()

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

File

tests/src/Functional/Form/LingotekMetadataEditFormTest.php, line 61

Class

LingotekMetadataEditFormTest
Tests the Lingotek metadata form.

Namespace

Drupal\Tests\lingotek\Functional\Form

Code

public function testMetadataLocalTaskNotAvailable() {
  $assert_session = $this
    ->assertSession();

  // Create a node.
  $edit = [];
  $edit['title[0][value]'] = 'Llamas are cool';
  $edit['body[0][value]'] = 'Llamas are very cool';
  $edit['langcode[0][value]'] = 'en';
  $edit['lingotek_translation_management[lingotek_translation_profile]'] = 'automatic';
  $this
    ->saveAndPublishNodeForm($edit);
  $this
    ->assertUrl('/node/1', [], 'Node has been created.');

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