Make WordPress Core

Opened 11 months ago

Closed 10 months ago

Last modified 10 months ago

#64329 closed defect (bug) (fixed)

Block Processor tests fail without intl extension

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

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.


11 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
11 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
11 months ago

  • Keywords dev-feedback added

Adding dev-feedback keyword for backport into 6.9.1

#5 @jonsurrell
11 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Approving this test fix for certain environments for backport.

#6 @jorbin
10 months ago

  • Keywords fixed-major added

[61342] looks good for backport.

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


10 months ago

#8 @wildworks
10 months ago

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

#9 @jonsurrell
10 months ago

  • Owner set to jonsurrell
  • Resolution → fixed
  • Status new → 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
10 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.