Make WordPress Core

Opened 8 months ago

Closed 8 months ago

Last modified 6 months ago

#59953 closed defect (bug) (fixed)

PHPunit tests for _wp_timezone_choice_usort_callback

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


Change History (5)

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

8 months ago

  • Keywords has-patch has-unit-tests added

#2 @jorbin
8 months ago

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

#3 @jorbin
8 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 57145:

Add automated tests for _wp_timezone_choice_usort_callback

Props pbearne.
Fixes #59953.

#4 @SergeyBiryukov
8 months 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:

6 months ago

Thanks for the PR! This was merged in r57145.

Note: See TracTickets for help on using tickets.