public function LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 4.0.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 3.0.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 3.1.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 3.2.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 3.3.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 3.4.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 3.5.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 3.7.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
- 3.8.x tests/src/Functional/FieldFormatters/LingotekTranslationStatusFormatterTest.php \Drupal\Tests\lingotek\Functional\FieldFormatters\LingotekTranslationStatusFormatterTest::testLingotekSourceStatusFormatter()
Tests the Lingotek translation status field formatter.
File
- tests/
src/ Functional/ FieldFormatters/ LingotekTranslationStatusFormatterTest.php, line 54
Class
- LingotekTranslationStatusFormatterTest
- Tests the Lingotek translation status field formatter.
Namespace
Drupal\Tests\lingotek\Functional\FieldFormattersCode
public function testLingotekSourceStatusFormatter() {
$assert_session = $this
->assertSession();
$basepath = \Drupal::request()
->getBasePath();
// 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);
$assert_session
->addressEquals('/node/1');
$this
->drupalGet('/metadata/1');
$assert_session
->responseContains('Lingotek translation status');
$link = $this
->xpath("//a[@href='{$basepath}/admin/lingotek/entity/add_target/dummy-document-hash-id/es_MX?destination=" . $basepath . "/metadata/1' and @class='language-icon target-request' and @title='Spanish - Request translation' and text()='ES']");
$this
->assertEqual(count($link), 1, 'Link exists.');
}