You are here

public function GatherContentUploadTestBase::getMetatagMultilangNode in GatherContent 8.5

Returns the Node for the meta tag multilang ProcessPane test.

Return value

\Drupal\node\Entity\Node Node object.

1 call to GatherContentUploadTestBase::getMetatagMultilangNode()
GatherContentUploadTest::testProcessPanesMetatagMultilang in gathercontent_upload/tests/src/Kernel/GatherContentUploadTest.php
Tests field manipulation for metatag content.

File

gathercontent_upload/tests/src/Kernel/GatherContentUploadTestBase.php, line 320

Class

GatherContentUploadTestBase
Class GatherContentUploadTestBase.

Namespace

Drupal\Tests\gathercontent_upload\Kernel

Code

public function getMetatagMultilangNode() {
  $node = Node::create([
    'title' => 'Test metatag node',
    'type' => 'test_content',
    'body' => 'Test metatag body',
  ]);
  $node
    ->get('field_meta_alt')
    ->setValue(serialize([
    'title' => 'Test meta title',
    'description' => 'Test meta description',
  ]));
  return $node;
}