public function LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 4.0.x tests/src/Functional/LingotekNodeParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved()
- 3.1.x tests/src/Functional/LingotekNodeParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved()
- 3.2.x tests/src/Functional/LingotekNodeParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved()
- 3.3.x tests/src/Functional/LingotekNodeParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved()
- 3.5.x tests/src/Functional/LingotekNodeParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved()
- 3.6.x tests/src/Functional/LingotekNodeParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved()
- 3.7.x tests/src/Functional/LingotekNodeParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved()
- 3.8.x tests/src/Functional/LingotekNodeParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTest::testParagraphIsNotCheckedIfTranslationIsRemoved()
Tests that when we entity_reference_revisions perform a delete on a paragraph for syncing with its parent, the lingotek_entity_translation_delete() hook doesn't check statuses for a document without document id.
File
- tests/
src/ Functional/ LingotekNodeParagraphsTranslationTest.php, line 506
Class
- LingotekNodeParagraphsTranslationTest
- Tests translating a node with multiple locales including paragraphs.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testParagraphIsNotCheckedIfTranslationIsRemoved() {
ConfigurableLanguage::createFromLangcode('de')
->setThirdPartySetting('lingotek', 'locale', 'de_DE')
->save();
$this
->testNodeWithParagraphsTranslation();
/** @var \Drupal\paragraphs\ParagraphInterface $paragraph */
$node = Node::load(1);
$node
->save();
$paragraph = Paragraph::load(1);
$paragraph
->addTranslation('de');
$paragraph
->save();
$this
->drupalGet('node/1/edit');
$this
->drupalPostForm(NULL, [], 'Remove');
$this
->drupalPostForm(NULL, [], 'Confirm removal');
$this
->drupalPostForm(NULL, [], 'Save');
// The content is edited successfully.
$this
->assertText('Llamas are cool');
}