Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#59953 closed defect (bug) (fixed)

PHPunit tests for _wp_timezone_choice_usort_callback

Reported by: pbearne Owned by: jorbin
Priority: normal Milestone: 6.5
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description


Change History (5)

This ticket was mentioned in ​PR #5713 on ​WordPress/wordpress-develop by ​@pbearne.


3 years ago
#1

  • Keywords has-patch has-unit-tests added

#2 @jorbin
3 years ago

  • Milestone Awaiting Review → 6.5
  • Owner set to jorbin
  • Status new → assigned

#3 @jorbin
3 years ago

  • Resolution → fixed
  • Status assigned → closed

In 57145:

Add automated tests for _wp_timezone_choice_usort_callback

Props pbearne.
Fixes #59953.

#4 @SergeyBiryukov
3 years ago

In 57146:

Tests: Update _wp_timezone_choice_usort_callback() tests for consistency.

  • Use the same @group annotation as the other tests.
  • Use assertSame() to verify the type of the result.
  • Use data_ prefix for the data provider.
  • Use named data set in the data provider. This makes the output when using the --testdox option more descriptive and is helpful when trying to debug which data set from a data provider failed the test.
  • Other minor corrections.

Reference: ​Core Handbook: Writing PHP Tests: Repetitive Tests.

Follow-up to [57145].

See #59953, #59647.

​@SergeyBiryukov commented on ​PR #5713:


3 years ago
#5

Thanks for the PR! This was merged in r57145.

Note: See TracTickets for help on using tickets.