Make WordPress Core

Opened 6 months ago

Closed 4 months ago

Last modified 4 months ago

#64329 closed defect (bug) (fixed)

Block Processor tests fail without intl extension

Reported by: dmsnell's profile dmsnell Owned by: jonsurrell's profile jonsurrell
Milestone: 6.9.1 Priority: normal
Severity: normal Version: 6.9
Component: Editor Keywords: has-patch has-unit-tests dev-reviewed fixed-major
Focuses: tests Cc:

Description

The new Block Processor test suite calls NumberFormatter without checking if it exists. It uses the class for generating test failure errors, but in environments without the intl extension it will crash.

Change History (10)

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


6 months ago
#1

  • Keywords has-patch has-unit-tests added

Trac ticket: Core-64329

The Block Processor tests call NumberFormatter for generating its error messages, but in environments lacking the intl extension this led to crashes while running the tests.

This patch reworks the tests so that they avoid calling NumberFormatter so that the tests run on more diverse setups.

#2 @dmsnell
6 months ago

In 61342:

Block Processor: Remove use of NumberFormatter from test suite.

The Block Processor tests call NumberFormatter for generating its
error messages, but in environments lacking the intl extension this
led to crashes while running the tests.

This patch reworks the tests so that they avoid calling
NumberFormatter so that the tests run on more diverse setups.

Developed in https://github.com/WordPress/wordpress-develop/pull/10576
Discussed in https://core.trac.wordpress.org/ticket/64329

Follow-up to [60939].

Props desrosj, ellatrix, peterwilsoncc, westonruter.

See #64329.

#4 @dmsnell
6 months ago

  • Keywords dev-feedback added

Adding dev-feedback keyword for backport into 6.9.1

#5 @jonsurrell
5 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Approving this test fix for certain environments for backport.

#6 @jorbin
4 months ago

  • Keywords fixed-major added

[61342] looks good for backport.

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


4 months ago

#8 @wildworks
4 months ago

@dmsnell @jonsurrell Do you have the bandwidth to commit the changes to the 6.9 branch?

#9 @jonsurrell
4 months ago

  • Owner set to jonsurrell
  • Resolution set to fixed
  • Status changed from new to closed

In 61529:

Block Processor: Remove use of NumberFormatter from test suite.

The Block Processor tests call NumberFormatter for generating its error messages, but in environments lacking the intl extension this led to crashes while running the tests.

This patch reworks the tests so that they avoid calling NumberFormatter so that the tests run on more diverse setups.

Developed in https://github.com/WordPress/wordpress-develop/pull/10576
Discussed in https://core.trac.wordpress.org/ticket/64329

Follow-up to [60939].

Reviewed by jonsurrell, jorbin.
Merges [61342] to the 6.9 branch.

Props desrosj, ellatrix, peterwilsoncc, westonruter.

Fixes #64329.

#10 @dmsnell
4 months ago

thanks you @jonsurrell and @wildworks — as usual, I’m a bit behind and sinking further.

Note: See TracTickets for help on using tickets.