You are here

protected function BasicFieldsTest::setUp in Entity Share 8.3

Same name and namespace in other branches
  1. 8.2 modules/entity_share_client/tests/src/Functional/BasicFieldsTest.php \Drupal\Tests\entity_share_client\Functional\BasicFieldsTest::setUp()

Overrides EntityShareClientFunctionalTestBase::setUp

File

modules/entity_share_client/tests/src/Functional/BasicFieldsTest.php, line 46

Class

BasicFieldsTest
General functional test class.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this->entityTypeManager
    ->getStorage('jsonapi_resource_config')
    ->create([
    'id' => 'node--es_test',
    'disabled' => FALSE,
    'path' => 'node/es_test',
    'resourceType' => 'node--es_test',
    'resourceFields' => [
      'title' => [
        'fieldName' => 'title',
        'publicName' => $this
          ->randomMachineName(),
        'enhancer' => [
          'id' => '',
        ],
        'disabled' => FALSE,
      ],
      'langcode' => [
        'fieldName' => 'langcode',
        'publicName' => $this
          ->randomMachineName(),
        'enhancer' => [
          'id' => '',
        ],
        'disabled' => FALSE,
      ],
    ],
  ])
    ->save();
  $this
    ->postSetupFixture();
}