getSession()->getResponseHeaders() instead. See https://www.drupal.org/node/3067207 */ public function testDrupalGetHeaders() { $this->assertSame( $this->getSession()->getResponseHeaders(), $this->drupalGetHeaders() ); } }