You are here

protected function EntityDisplaySetupTrait::createVideoNode in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/EntityDisplaySetupTrait.php \Drupal\Tests\video_embed_field\Functional\EntityDisplaySetupTrait::createVideoNode()

Create a video node using the video field.

Parameters

string $value: The video URL to use for the field value.

Return value

\Drupal\node\NodeInterface A node.

3 calls to EntityDisplaySetupTrait::createVideoNode()
AutoplayPermissionTest::testAutoplay in tests/src/Functional/AutoplayPermissionTest.php
Test the autoplay permission works.
ColorboxFormatterTest::testColorboxFormatter in tests/src/FunctionalJavascript/ColorboxFormatterTest.php
Test the colorbox formatter.
LazyLoadFormatterTest::testColorboxFormatter in tests/src/FunctionalJavascript/LazyLoadFormatterTest.php
Test the lazy load formatter.

File

tests/src/Functional/EntityDisplaySetupTrait.php, line 111

Class

EntityDisplaySetupTrait
A trait for manipulating entity display.

Namespace

Drupal\Tests\video_embed_field\Functional

Code

protected function createVideoNode($value) {
  return $this
    ->createNode([
    'type' => $this->contentTypeName,
    $this->fieldName => [
      [
        'value' => $value,
      ],
    ],
  ]);
}