By longwave on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
9.2.x
Introduced in version:
9.2.0
Issue links:
Description:
Drupal\Tests\BrowserTestBase::drupalGetHeader() is deprecated. Use $this->getSession()->getResponseHeader() instead.
When testing for the value of a header, consider using responseHeaderEquals() instead:
Before:
$this->assertSame('HIT', $this->drupalGetHeader('X-Drupal-Dynamic-Cache'));
After:
$this->assertSession()->responseHeaderEquals('X-Drupal-Dynamic-Cache', 'HIT');
Impacts:
Module developers