public function LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 4.0.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 3.0.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 3.1.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 3.2.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 3.3.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 3.4.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 3.5.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 3.6.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
- 3.7.x tests/src/Functional/Form/LingotekMetadataEditFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekMetadataEditFormTest::testMetadataLocalTaskAvailable()
Tests that if debug is not enabled, metadata tab is not available.
File
- tests/
src/ Functional/ Form/ LingotekMetadataEditFormTest.php, line 80
Class
- LingotekMetadataEditFormTest
- Tests the Lingotek metadata form.
Namespace
Drupal\Tests\lingotek\Functional\FormCode
public function testMetadataLocalTaskAvailable() {
$assert_session = $this
->assertSession();
// Enable debug operations.
$this
->drupalPostForm('admin/lingotek/settings', [], 'Enable debug operations');
// 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 be visible.
$this
->drupalGet('/node/1');
$assert_session
->linkExists(t('Lingotek Metadata'));
}