You are here

protected function LayoutRestTestBase::getDecodedContents in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php \Drupal\Tests\layout_builder\Functional\Rest\LayoutRestTestBase::getDecodedContents()

Gets the decoded contents.

Parameters

\Psr\Http\Message\ResponseInterface $response: The response.

Return value

array The decoded contents.

1 call to LayoutRestTestBase::getDecodedContents()
OverrideSectionsTest::testOverrideField in core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php
Tests that the layout override field is not normalized.

File

core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php, line 145

Class

LayoutRestTestBase
Base class for Layout Builder REST tests.

Namespace

Drupal\Tests\layout_builder\Functional\Rest

Code

protected function getDecodedContents(ResponseInterface $response) {
  return $this->serializer
    ->decode((string) $response
    ->getBody(), static::$format);
}