function WorkflowResourceTestBase::getExpectedNormalizedEntity

Same name in other branches
  1. 9 core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php \Drupal\Tests\workflows\Functional\Rest\WorkflowResourceTestBase::getExpectedNormalizedEntity()
  2. 10 core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php \Drupal\Tests\workflows\Functional\Rest\WorkflowResourceTestBase::getExpectedNormalizedEntity()
  3. 11.x core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php \Drupal\Tests\workflows\Functional\Rest\WorkflowResourceTestBase::getExpectedNormalizedEntity()

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

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(),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.