You are here

protected function EmbeddedEntityTest::setUp in Entity Share 8.3

@SuppressWarnings(PHPMD.UndefinedVariable) Bug in PHPMD,

Overrides EntityShareClientFunctionalTestBase::setUp

See also

https://github.com/phpmd/phpmd/issues/714

File

modules/entity_share_client/tests/src/Functional/EmbeddedEntityTest.php, line 67

Class

EmbeddedEntityTest
Functional test class for embedded entities in RTE fields.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->getTestFiles('image');

  // Special case for the image created using native helper method.
  if (isset(static::$filesData['file_image'])) {
    $this->filesSize['file_image'] = filesize(static::$filesData['file_image']['uri']);
  }
  $this->entityTypeManager
    ->getStorage('jsonapi_resource_config')
    ->create([
    'id' => 'node--es_test',
    'disabled' => FALSE,
    'path' => 'node/es_test',
    'resourceType' => 'node--es_test',
    'resourceFields' => [
      'field_es_test_text_formatted_lon' => [
        'fieldName' => 'field_es_test_text_formatted_lon',
        'publicName' => 'field_es_test_text_formatted_lon',
        'enhancer' => [
          'id' => 'entity_share_embedded_entities',
        ],
        'disabled' => FALSE,
      ],
    ],
  ])
    ->save();
  $this
    ->postSetupFixture();
}