You are here

protected function LayoutBuilderAtBase::updateNode in Layout Builder Asymmetric Translation 8.2

Update a node.

Parameters

$langcode:

1 call to LayoutBuilderAtBase::updateNode()
LayoutBuilderAtReplicateTest::testAsymmetricTranslationWithReplicate in tests/src/Functional/LayoutBuilderAtReplicateTest.php
Tests that layout overrides have copied blocks.

File

tests/src/Functional/LayoutBuilderAtBase.php, line 290

Class

LayoutBuilderAtBase
Base class for Layout Builder Asymmetric Translations.

Namespace

Drupal\Tests\layout_builder_at\Functional

Code

protected function updateNode($langcode) {
  $user = $this->loggedInUser;
  $this
    ->drupalLogin($this->fullAdmin);
  $update_url = Url::fromRoute("entity.{$this->entityTypeId}.edit_form", [
    $this->entityTypeId => $this->entity
      ->id(),
  ], [
    'language' => \Drupal::languageManager()
      ->getLanguage($langcode),
  ]);
  $edit = [];
  $this
    ->drupalPostForm($update_url, $edit, 'Save');
  $this
    ->drupalLogin($user);
}