function FileUploadTest::assertResponseData

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Functional/FileUploadTest.php \Drupal\Tests\jsonapi\Functional\FileUploadTest::assertResponseData()
  2. 8.9.x core/modules/jsonapi/tests/src/Functional/FileUploadTest.php \Drupal\Tests\jsonapi\Functional\FileUploadTest::assertResponseData()
  3. 11.x core/modules/jsonapi/tests/src/Functional/FileUploadTest.php \Drupal\Tests\jsonapi\Functional\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.

8 calls to FileUploadTest::assertResponseData()
FileUploadTest::testFileUploadMaliciousExtension in core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
Tests using the file upload POST route with malicious extensions.
FileUploadTest::testFileUploadNoConfiguration in core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
Tests using the file upload POST route no configuration.
FileUploadTest::testFileUploadStrippedFilePath in core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
Tests using the file upload route with any path prefixes being stripped.
FileUploadTest::testFileUploadUnicodeFilename in core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
Tests using the file upload route with a unicode file name.
FileUploadTest::testFileUploadZeroByteFile in core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
Tests using the file upload route with a zero byte file.

... See full list

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.