function FileUploadTest::assertResponseData

Asserts expected normalized data matches response data.

@internal

Parameters

array $expected: The expected data.

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

File

core/modules/jsonapi/tests/src/Functional/FileUploadTest.php, line 876

Class

FileUploadTest
Tests binary data file upload route.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function assertResponseData(array $expected, ResponseInterface $response) : void {
  static::recursiveKSort($expected);
  $actual = $this->getDocumentFromResponse($response);
  static::recursiveKSort($actual);
  $this->assertSame($expected, $actual);
}

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