public function LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded in Lingotek Translation 8.2
Same name and namespace in other branches
- 4.0.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.0.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.1.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.2.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.3.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.4.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.5.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.6.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.7.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
- 3.8.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testParagraphContentMetadataIsSavedWhenContentAdded()
Tests that metadata is created when a paragraph is added.
File
- tests/
src/ Functional/ LingotekNodeNestedParagraphsTranslationTest.php, line 455
Class
- LingotekNodeNestedParagraphsTranslationTest
- Tests translating a node with multiple locales including nested paragraphs.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testParagraphContentMetadataIsSavedWhenContentAdded() {
// Login as admin.
$this
->drupalLogin($this->rootUser);
// Add paragraphed content.
$this
->drupalGet('node/add/paragraphed_nested_content');
$this
->drupalPostForm(NULL, NULL, t('Add Image + Text'));
$edit = [];
$edit['title[0][value]'] = 'Llamas are cool';
$edit['langcode[0][value]'] = 'en';
$edit['field_paragraph_container[0][subform][field_paragraphs_demo][0][subform][field_text_demo][0][value]'] = 'Llamas are very cool';
$this
->saveAndPublishNodeForm($edit, NULL);
$metadata = LingotekContentMetadata::loadMultiple();
$this
->assertEqual(3, count($metadata), 'There is metadata saved for the parent entity and the child nested entities.');
}