Changeset 57146
- Timestamp:
- 11/30/2023 11:15:34 AM (13 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/wpTimezoneChoiceUsortCallback.php
r57145 r57146 2 2 3 3 /** 4 * Tests for the _wp_timezone_choice_usort_callback function.4 * Tests for the _wp_timezone_choice_usort_callback() function. 5 5 * 6 * @group Functions.php6 * @group function 7 7 * 8 8 * @covers ::_wp_timezone_choice_usort_callback … … 13 13 * @ticket 59953 14 14 * 15 * @dataProvider wp_timezone_choice_usort_callback_data15 * @dataProvider data_wp_timezone_choice_usort_callback 16 16 */ 17 public function test__wp_timezone_choice_usort_callback( $unsorted, $sorted, $info ) { 18 17 public function test_wp_timezone_choice_usort_callback( $unsorted, $sorted ) { 19 18 usort( $unsorted, '_wp_timezone_choice_usort_callback' ); 20 19 21 $this->assert Equals( $sorted, $unsorted, $info);20 $this->assertSame( $sorted, $unsorted ); 22 21 } 23 22 24 25 public function wp_timezone_choice_usort_callback_data() { 23 public function data_wp_timezone_choice_usort_callback() { 26 24 return array( 27 array(25 'just GMT+' => array( 28 26 'unsorted' => array( 29 27 array( … … 100 98 ), 101 99 ), 102 'info' => '_wp_timezone_choice_usort_callback: just GMT+', 103 ), 104 105 array( 100 ), 101 102 'mixed UTC and GMT' => array( 106 103 'unsorted' => array( 107 104 array( … … 178 175 ), 179 176 ), 180 'info' => '_wp_timezone_choice_usort_callback: MIXED utc and GMT', 181 ), 182 183 array( 177 ), 178 179 'just alpha city' => array( 184 180 'unsorted' => array( 185 181 array( … … 256 252 ), 257 253 ), 258 'info' => '_wp_timezone_choice_usort_callback: just alpha city', 259 ), 260 261 array( 254 ), 255 256 'not Etc continents are not sorted' => array( 262 257 'unsorted' => array( 263 258 array( … … 334 329 ), 335 330 ), 336 'info' => '_wp_timezone_choice_usort_callback: not Etc continent are not sorted',337 ), 338 array(331 ), 332 333 'not Etc just t_continent' => array( 339 334 'unsorted' => array( 340 335 array( … … 411 406 ), 412 407 ), 413 'info' => '_wp_timezone_choice_usort_callback: not Etc just t_city',414 ), 415 array(408 ), 409 410 'not Etc just t_city' => array( 416 411 'unsorted' => array( 417 412 array( … … 488 483 ), 489 484 ), 490 'info' => '_wp_timezone_choice_usort_callback: not Etc just t_city',491 ), 492 array(485 ), 486 487 'not Etc just t_subcity' => array( 493 488 'unsorted' => array( 494 489 array( … … 565 560 ), 566 561 ), 567 'info' => '_wp_timezone_choice_usort_callback: just sub city',568 ), 569 array(562 ), 563 564 'just continent with Etc which pulls 1 to bottom' => array( 570 565 'unsorted' => array( 571 566 array( … … 642 637 ), 643 638 ), 644 'info' => '_wp_timezone_choice_usort_callback: just continent with etc which pulls 1 to bottom',645 639 ), 646 640 );
Note: See TracChangeset
for help on using the changeset viewer.