Make WordPress Core

Opened 2 years ago

Last modified 6 weeks ago

#59941 reviewing defect (bug)

PHPUnit test for wp_timezone_choice

Reported by: pbearne's profile pbearne Owned by:
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: Date/Time Keywords: has-patch has-unit-tests
Focuses: tests Cc:

Description


Change History (18)

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


2 years ago
#1

  • Keywords has-patch has-unit-tests added

This ticket was mentioned in Slack in #polyglots by pbearne. View the logs.


2 years ago

#3 @pbearne
2 years ago

started the test but found and issue with setting the locale as the city files is missing the labels
asking on slack for help https://wordpress.slack.com/team/U02S95N2X

#4 @swissspidy
20 months ago

@pbearne Is this question about the missing translations still open?

Strings like "Select a city" are not in the continents-cities-es_ES.mo file but the regular es_ES.mo file.

Note that translation files within tests/phpunit/data/languages/ usually only contain a tiny amount of strings just for testing to keep things simpler.

#5 @pbearne
20 months ago

@swissspidy yes
I can add the needed strings but need make sure that is OK

#6 @SergeyBiryukov
20 months ago

  • Summary changed from PPHunit test for wp_timezone_choice to PHPUnit test for wp_timezone_choice

#7 @pbearne
20 months ago

  • Owner set to pbearne
  • Status changed from new to assigned

removed extra strings from the translation files

#8 @pbearne
20 months ago

Had to add the text strings to the new continents-cities-es_ES.l10n.php and ES.l10n.php files

add the string in the new fields to the.po and created .mo for them

#9 @desrosj
12 months ago

  • Component changed from Build/Test Tools to Date/Time
  • Milestone changed from Awaiting Review to Future Release

Since this is about adding tests and not a general build or test tooling change, I'm reassigning it to the relevant component.

#10 @pbearne
11 months ago

  • Milestone changed from Future Release to 6.8

#11 @audrasjb
9 months ago

I added some small change requests in the PR ;)

#12 @desrosj
8 months ago

  • Focuses tests added

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


7 months ago

#14 @audrasjb
7 months ago

  • Owner changed from pbearne to audrasjb
  • Status changed from assigned to reviewing

Self assigning for final review and commit

#15 @audrasjb
7 months ago

  • Milestone changed from 6.8 to 6.9

Moving for 6.9 consideration

#16 @rollybueno
3 months ago

The PR's latest trunk merged was 6 months ago and the Docker does not initiate. Not until I merge latest trunk after fetching. Command used:

git fetch upstream pull/5694/head:pr-5694
git checkout pr-5694
Last edited 3 months ago by rollybueno (previous) (diff)

#17 @rollybueno
3 months ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/5694

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.28
  • Server: nginx/1.29.0
  • Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 137.0.0.0
  • OS: Linux
  • Theme: Twenty Twenty-One 2.6
  • MU Plugins: None activated
  • Plugins:
    • Query Monitor 3.18.0
    • Test Reports 1.2.0

Actual Results

  1. ✅ Issue resolved with patch.

Additional Notes

  • Merge latest trunk manually when fetching the PR

Supplemental Artifacts

Spanish translations on Timezone:
https://i.imgur.com/PgSDzlg.png
https://i.imgur.com/N2hGZNd.png

Unit tests:
https://i.imgur.com/A0sL4hR.png
https://i.imgur.com/lEEgAjS.png
https://i.imgur.com/CZAnew6.png
https://i.imgur.com/78FbmqD.png

#18 @audrasjb
6 weeks ago

  • Owner audrasjb deleted

Removing myself from some tickets as I won't be super available for 6.9.

Note: See TracTickets for help on using tickets.