Verified Commit bbc940fb authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3473374 by mxr576, bbrala, kristiaanvandeneynde: Improve Dynamic Page...

Issue #3473374 by mxr576, bbrala, kristiaanvandeneynde: Improve Dynamic Page Cache header assertions in JSON:API tests

(cherry picked from commit 3c87a260)
parent b05bc55d
Loading
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -1370,12 +1370,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php',
];
$ignoreErrors[] = [
	// identifier: variable.undefined
	'message' => '#^Variable \\$dynamic_cache might not be defined\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/ResourceTestBase.php',
];
$ignoreErrors[] = [
	// identifier: variable.undefined
	'message' => '#^Variable \\$parseable_invalid_request_body might not be defined\\.$#',
+106 −109

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -473,7 +473,7 @@ public function testQueryInvolvingRoles(): void {

    $response = $this->request('GET', $collection_url, $request_options);
    $expected_cache_contexts = ['url.path', 'url.query_args', 'url.site'];
    $this->assertResourceErrorResponse(400, "Filtering on config entities is not supported by Drupal's entity API. You tried to filter on a Role config entity.", $collection_url, $response, FALSE, ['4xx-response', 'http_response'], $expected_cache_contexts, FALSE, 'MISS');
    $this->assertResourceErrorResponse(400, "Filtering on config entities is not supported by Drupal's entity API. You tried to filter on a Role config entity.", $collection_url, $response, FALSE, ['4xx-response', 'http_response'], $expected_cache_contexts, NULL, 'MISS');
  }

  /**
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ public function doTestCollectionFilterAccessBasedOnPermissions($label_field_name
      'url.site',
      'user.permissions',
    ];
    $this->assertResourceErrorResponse(403, $message, $collection_filter_url, $response, FALSE, $expected_cache_tags, $expected_cache_contexts, FALSE, 'MISS');
    $this->assertResourceErrorResponse(403, $message, $collection_filter_url, $response, FALSE, $expected_cache_tags, $expected_cache_contexts, NULL, 'MISS');
    // And ensure the it is allowed when the proper permission is granted.
    $this->grantPermissionsToTestedRole(['filter by spotlight field']);
    $response = $this->request('GET', $collection_filter_url, $request_options);