Make WordPress Core

Opened 2 years ago

Closed 32 hours ago

#59941 closed defect (bug) (fixed)

PHPUnit test for wp_timezone_choice

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

Change History (47)

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
2 years 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
2 years ago

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

#6 @SergeyBiryukov
2 years ago

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

#7 @pbearne
2 years ago

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

removed extra strings from the translation files

#8 @pbearne
2 years 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
18 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
16 months ago

  • Milestone changed from Future Release to 6.8

#11 @audrasjb
14 months ago

I added some small change requests in the PR ;)

#12 @desrosj
14 months ago

  • Focuses tests added

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


13 months ago

#14 @audrasjb
13 months ago

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

Self assigning for final review and commit

#15 @audrasjb
12 months ago

  • Milestone changed from 6.8 to 6.9

Moving for 6.9 consideration

#16 @rollybueno
8 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 8 months ago by rollybueno (previous) (diff)

#17 @rollybueno
8 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
7 months ago

  • Owner audrasjb deleted

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

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


5 months ago

#20 @welcher
5 months ago

  • Description modified (diff)
  • Keywords commit added

#21 @welcher
5 months ago

  • Description modified (diff)


Reviewed in the 6.9 bug scrub today. We're 1 week from RC 1 and this looks like it's ready.

#22 @SirLouen
5 months ago

  • Keywords changes-requested added

#23 follow-up: @wildworks
5 months ago

  • Milestone changed from 6.9 to 7.0

Hi @pbearne, do you have the bandwidth to address the feedback added to the pull request?

If there is no progress by the RC1 release next week, I will punt this ticket to 7.0.

#24 @wildworks
5 months ago

  • Milestone changed from 7.0 to 6.9

#25 in reply to: ↑ 23 @pbearne
5 months ago

Replying to wildworks:

Hi @pbearne, do you have the bandwidth to address the feedback added to the pull request?

If there is no progress by the RC1 release next week, I will punt this ticket to 7.0.

Done

@SirLouen commented on PR #5694:


5 months ago
#26

@pbearne did you see my PR?

#27 @wildworks
5 months ago

  • Keywords changes-requested removed

It appears that all feedback has been addressed.

@westonruter commented on PR #5694:


5 months ago
#28

did you see my PR?

@SirLouen Can you apply your suggestions directly to this PR? Or can you provide a link to the PR you're referring to?

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


5 months ago

#30 @welcher
5 months ago

  • Milestone changed from 6.9 to Future Release

This was reviewed in the 6.9 bug scrub today. As we're releasing RC 1 tomorrow, I'm going to punt this.

#31 @westonruter
4 months ago

  • Keywords commit removed
  • Milestone changed from Future Release to 7.0

Removing commit because there may be additional changes proposed by @SirLouen not yet applied.

@SirLouen commented on PR #5694:


4 months ago
#32

@westonruter it was only some little tweaks I sent back in the day to @pbearne 's branch
https://github.com/pbearne/wordpress-develop/pull/183

@westonruter commented on PR #5694:


4 months ago
#33

@SirLouen I fixed the merge conflicts and merged the branch into this one.

@westonruter commented on PR #5694:


4 months ago
#34

As far as I can see, yes, it looks ready for commit. But I don't have any experience with adding files to ‎tests/phpunit/data so I defer to someone with i18n expertise, especially @swissspidy.

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


4 weeks ago

#36 @juanmaguitar
4 weeks ago

  • Keywords needs-testing added

From today's Bug Srub

It has a PR that looks ready to commit. We can just add the needs-testing keyword.

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


9 days ago

#38 @audrasjb
9 days ago

  • Keywords needs-testing removed

Removing needs-testing as this is a unit test ticket.

#39 @audrasjb
9 days ago

  • Component changed from Date/Time to Build/Test Tools

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


3 days ago

@juanmaguitar commented on PR #5694:


3 days ago
#41

@swissspidy This PR seems ready to be merged. As per this comment do you think you'll be able to have a final look at it before WP 7.0 final release date (in a few weeks)

@swissspidy commented on PR #5694:


3 days ago
#42

🚢 it

@westonruter commented on PR #5694:


2 days ago
#43

@swissspidy The tests weren't passing after 9165507. It seems some dir=auto attributes were missing from the tests. I added them in bb85bc6. Please review.

@swissspidy commented on PR #5694:


2 days ago
#44

Ah thanks. Still good to go :)

#45 @westonruter
2 days ago

  • Keywords commit added

#46 @SergeyBiryukov
36 hours ago

  • Owner set to SergeyBiryukov

#47 @SergeyBiryukov
32 hours ago

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

In 62156:

Tests: Add unit tests for wp_timezone_choice().

Follow-up to [57145], [59931].

Reviewed by westonruter, swissspidy, SergeyBiryukov.

Props pbearne, SirLouen, wildworks, westonruter, swissspidy, audrasjb, juanmaguitar, rollybueno, welcher, SergeyBiryukov.
Fixes #59941.

Note: See TracTickets for help on using tickets.