public function LingotekContentTypeTranslationTest::testEditedContentTypeTranslation in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 4.0.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 3.0.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 3.1.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 3.2.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 3.3.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 3.5.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 3.6.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 3.7.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
- 3.8.x tests/src/Functional/LingotekContentTypeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentTypeTranslationTest::testEditedContentTypeTranslation()
Tests that a config can be translated after edited.
File
- tests/
src/ Functional/ LingotekContentTypeTranslationTest.php, line 100
Class
- LingotekContentTypeTranslationTest
- Tests translating a content type.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testEditedContentTypeTranslation() {
$assert_session = $this
->assertSession();
// We need a config with translations first.
$this
->testContentTypeTranslation();
// Add a language so we can check that it's not marked as dirty if there are
// no translations.
ConfigurableLanguage::createFromLangcode('eu')
->setThirdPartySetting('lingotek', 'locale', 'eu_ES')
->save();
// Edit the content type.
$edit['name'] = 'Blogpost';
$this
->drupalPostForm('/admin/structure/types/manage/article', $edit, t('Save content type'));
$this
->assertText('The content type Blogpost has been updated.');
$this
->clickLink(t('Translate'));
// Check the status is not edited for Vasque, but available to request
// translation.
$assert_session
->linkByHrefExists('admin/lingotek/config/request/node_type/article/eu_ES');
$assert_session
->linkByHrefNotExists('admin/lingotek/config/request/node_type/article/es_MX');
// Recheck status.
$this
->clickLink('Check Download');
$this
->assertText('Translation to es_MX status checked successfully');
// Download the translation.
$this
->clickLink('Download');
$this
->assertText('Translation to es_MX downloaded successfully');
}