protected function ParagraphsLangcodeChangeTest::reassignEntities

Helper method to reassign the current entity objects.

2 calls to ParagraphsLangcodeChangeTest::reassignEntities()
ParagraphsLangcodeChangeTest::buildNodeForm in paragraphs/tests/src/Kernel/ParagraphsLangcodeChangeTest.php
Builds the node form.
ParagraphsLangcodeChangeTest::submitNodeForm in paragraphs/tests/src/Kernel/ParagraphsLangcodeChangeTest.php
Submits the node form, emulating the save operation as triggering element.

File

paragraphs/tests/src/Kernel/ParagraphsLangcodeChangeTest.php, line 377

Class

ParagraphsLangcodeChangeTest
Tests the langcode change mechanics of paragraphs.

Namespace

Drupal\Tests\paragraphs\Kernel

Code

protected function reassignEntities() {
  $this->node = $this->formObject
    ->getEntity();
  $paragraphs = $this->node
    ->get($this->nodeParagraphsFieldName)
    ->referencedEntities();
  $this->paragraph = reset($paragraphs);
}