Tests: Test custom assertions parameter data type in WP_UnitTestCase_Base.

The following changes improve tests stability.

The `assertEqualFields()` method expects an object and a fields array as inputs and subsequently approaches the received parameters as such, but did not verify whether the received parameters are of the expected types.

Along the same lines, the `assertSameSets()`, `assertEqualSets()`, `assertSameSetsWithIndex()` and the `assertEqualSetsWithIndex()` methods all expect arrays for both the actual as well as the expected values and uses the array function `[k]sort()` on both, but never verified that the received inputs were actually arrays, which could lead to PHP errors on the sorting function calls.

Follow-up to [30687], [42343], [48937], [48939], [51480], [51481].

Props jrf.
See #53363.
Built from https://develop.svn.wordpress.org/trunk@51697


git-svn-id: http://core.svn.wordpress.org/trunk@51303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
hellofromTonya 2021-08-30 20:19:59 +00:00
parent 6b2eccb0e3
commit 702ea22639

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-51695';
$wp_version = '5.9-alpha-51697';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.