You are here

protected function WorkflowResourceTestBase::getExpectedNormalizedEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php \Drupal\Tests\workflows\Functional\Rest\WorkflowResourceTestBase::getExpectedNormalizedEntity()

Returns the expected normalization of the entity.

Return value

array

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

File

core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php, line 69

Class

WorkflowResourceTestBase
ResourceTestBase for Workflow entity.

Namespace

Drupal\Tests\workflows\Functional\Rest

Code

protected function getExpectedNormalizedEntity() {
  return [
    'dependencies' => [
      'module' => [
        'workflow_type_test',
      ],
    ],
    'id' => 'rest_workflow',
    'label' => 'REST Workflow',
    'langcode' => 'en',
    'status' => TRUE,
    'type' => 'workflow_type_complex_test',
    'type_settings' => [
      'states' => [
        'draft' => [
          'extra' => 'bar',
          'label' => 'Draft',
          'weight' => 0,
        ],
        'published' => [
          'label' => 'Published',
          'weight' => 1,
        ],
      ],
      'transitions' => [],
      'example_setting' => 'foo',
    ],
    'uuid' => $this->entity
      ->uuid(),
  ];
}