Changeset 55077
- Timestamp:
- 01/16/2023 04:19:54 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/wpListPluck.php
r51668 r55077 196 196 * @dataProvider data_test_wp_list_pluck 197 197 * 198 * @param array $ listList of objects or arrays.199 * @param int|string $field Field from the object to place instead of the entire object200 * @param int|string $index_key Field from the object to use as keys for the new array.201 * @param array $expected Expected result.202 */ 203 public function test_wp_list_pluck( $ list, $field, $index_key, $expected ) {204 $this->assertSameSetsWithIndex( $expected, wp_list_pluck( $ list, $field, $index_key ) );198 * @param array $input_list List of objects or arrays. 199 * @param int|string $field Field from the object to place instead of the entire object 200 * @param int|string $index_key Field from the object to use as keys for the new array. 201 * @param array $expected Expected result. 202 */ 203 public function test_wp_list_pluck( $input_list, $field, $index_key, $expected ) { 204 $this->assertSameSetsWithIndex( $expected, wp_list_pluck( $input_list, $field, $index_key ) ); 205 205 } 206 206
Note: See TracChangeset
for help on using the changeset viewer.