Previously in Drupal we used responseHeaderEquals() to check for the non-existence of a header by looking for NULL:
$this->assertSession()->responseHeaderEquals('Access-Control-Allow-Origin', NULL);
Since Mink 1.11 this no longer works as $value is typed as string, although getResponseHeader() can still return NULL:
public function responseHeaderEquals(string $name, string $value)
{
$actual = $this->session->getResponseHeader($name);
There appears to be no supported way to check that a header does not exist. We had in fact already added responseHeader[Not]Exists() helper methods to Drupal, but after upgrading to Mink 1.11 we found we had not converted all cases to use them.
Previously in Drupal we used
responseHeaderEquals()to check for the non-existence of a header by looking for NULL:Since Mink 1.11 this no longer works as
$valueis typed as string, althoughgetResponseHeader()can still return NULL:There appears to be no supported way to check that a header does not exist. We had in fact already added
responseHeader[Not]Exists()helper methods to Drupal, but after upgrading to Mink 1.11 we found we had not converted all cases to use them.