You are here

protected function ResponsiveImageStyleResourceTestBase::getExpectedNormalizedEntity in Drupal 8

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

Returns the expected normalization of the entity.

Return value

array

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

File

core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php, line 77

Class

ResponsiveImageStyleResourceTestBase
ResourceTestBase for ResponsiveImageStyle entity.

Namespace

Drupal\Tests\responsive_image\Functional\Rest

Code

protected function getExpectedNormalizedEntity() {
  return [
    'breakpoint_group' => 'test_group',
    'dependencies' => [
      'config' => [
        'image.style.large',
        'image.style.medium',
      ],
    ],
    'fallback_image_style' => 'fallback',
    'id' => 'camelids',
    'image_style_mappings' => [
      0 => [
        'breakpoint_id' => 'test_breakpoint',
        'image_mapping' => 'small',
        'image_mapping_type' => 'image_style',
        'multiplier' => '1x',
      ],
      1 => [
        'breakpoint_id' => 'test_breakpoint',
        'image_mapping' => [
          'sizes' => '(min-width:700px) 700px, 100vw',
          'sizes_image_styles' => [
            'large' => 'large',
            'medium' => 'medium',
          ],
        ],
        'image_mapping_type' => 'sizes',
        'multiplier' => '2x',
      ],
    ],
    'label' => 'Camelids',
    'langcode' => 'en',
    'status' => TRUE,
    'uuid' => $this->entity
      ->uuid(),
  ];
}