wordpress-develop/tests
Tonya Mork 30f9d4e136 Tests: Do whitespace replacement in assertDiscardWhitespace() only when string.
The `assertDiscardWhitespace()` method uses `assertEquals()` under the hood, meaning that in reality any type of actual/expected value should be accepted by the function. Fixed the documentation to reflect that.

At the same time, only strings can contain whitespace differences. So the whitespace replacement should only be done when string values are passed.

This change (a) prevents potential `passing null to non-nullable` errors on PHP 8.1, if either of the inputs would turn out to be `null` and (b) increases tests stability.

Follow-up to [35003], [44902].

Props jrf.
See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51698 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-30 20:40:05 +00:00
..
e2e Build/Test Tools: Silence jQuery Migrate console warnings when running E2E tests. 2021-06-09 01:35:26 +00:00
gutenberg Block Editor: Update the Gutenberg branch used to launch Gutenberg e2e tests. 2021-06-01 09:21:36 +00:00
phpunit Tests: Do whitespace replacement in assertDiscardWhitespace() only when string. 2021-08-30 20:40:05 +00:00
qunit Application Passwords: Improve various user-facing and developer-facing terminology. 2021-07-19 21:13:36 +00:00