 .../tests/src/Functional/EntityResource/EntityResourceTestBase.php  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
index 53796c8..490d6a1 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -386,6 +386,8 @@ public function testGet() {
     // 200 for well-formed HEAD request.
     $response = $this->request('HEAD', $url, $request_options);
     $this->assertResourceResponse(200, '', $response);
+    $this->assertTrue($response->hasHeader('X-Drupal-Dynamic-Cache'));
+    $this->assertSame(['MISS'], $response->getHeader('X-Drupal-Dynamic-Cache'));
     if (!$this->account) {
       $this->assertSame(['MISS'], $response->getHeader('X-Drupal-Cache'));
     }
@@ -395,13 +397,17 @@ public function testGet() {
     $head_headers = $response->getHeaders();
 
     // 200 for well-formed GET request. Page Cache hit because of HEAD request.
+    // Same for Dynamic Page Cache hit.
     $response = $this->request('GET', $url, $request_options);
     $this->assertResourceResponse(200, FALSE, $response);
+    $this->assertTrue($response->hasHeader('X-Drupal-Dynamic-Cache'));
     if (!static::$auth) {
       $this->assertSame(['HIT'], $response->getHeader('X-Drupal-Cache'));
+      $this->assertSame(['MISS'], $response->getHeader('X-Drupal-Dynamic-Cache'));
     }
     else {
       $this->assertFalse($response->hasHeader('X-Drupal-Cache'));
+      $this->assertSame(['HIT'], $response->getHeader('X-Drupal-Dynamic-Cache'));
     }
     $cache_tags_header_value = $response->getHeader('X-Drupal-Cache-Tags')[0];
     $this->assertEquals($this->getExpectedCacheTags(), empty($cache_tags_header_value) ? [] : explode(' ', $cache_tags_header_value));
