Problem/Motivation
In #3407834: Update behat/mink and friends we've added "helpers" to\Drupal\Tests\WebAssert::responseHeaderEquals(string $name, $value)
(use responseHeaderDoesNotExist
when $value
is null) and \Drupal\Tests\UiHelperTrait::submitForm
(Mink only allows strings for text, number and radio button values.) to appease an update from behat/mink*
with stricter typing.
Since we were too close to a release of 10.2.0, we couldn't add those with proper fixes and deprecations for these helpers.
Whilst we did that, we also discovered an existing helper in \Drupal\Tests\UiHelperTrait::submitForm
(Provide support for the values '1' and '0' for checkboxes instead of TRUE and FALSE.) that needs fixing and deprecation.
Steps to reproduce
Proposed resolution
Deprecate in 10.3.0 for removal in 11.0.0:
- Calling \Drupal\Tests\WebAssert::responseHeaderEquals(string $name, $value) with a <code>$value
of NULL.
- Casting to string
for text, number and radio button values in \Drupal\Tests\UiHelperTrait::submitForm
.
- Casting to '0'/'1' from TRUE/FALSE string
for checkbox values in \Drupal\Tests\UiHelperTrait::submitForm
.
Fix all deprecations in core that are found for the above.