You are here

public function GatherContentUploadTestBase::getMetatagNode in GatherContent 8.5

Returns the Node for the meta tag ProcessPane test.

Return value

\Drupal\node\Entity\Node Node object.

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

File

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

Class

GatherContentUploadTestBase
Class GatherContentUploadTestBase.

Namespace

Drupal\Tests\gathercontent_upload\Kernel

Code

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