Make WordPress Core

Opened 8 weeks ago

Last modified 3 days ago

#64225 new task (blessed)

Test tool and unit test improvements for 7.0

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

Description

This ticket is for various fixes and improvements in PHPUnit tests that don't have a more specific ticket, as well as general improvements to the GitHub Actions workflows that run automated testing.

Change History (24)

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


8 weeks ago
#1

  • Keywords has-patch has-unit-tests added

This test verifies that post meta cache persists (is not invalidated) when a post is updated, which documents the actual WordPress cache behavior.

Trac ticket:
https://core.trac.wordpress.org/ticket/64225
https://core.trac.wordpress.org/ticket/63167

This ticket was mentioned in PR #10057 on WordPress/wordpress-develop by @jignesh.nakrani.


8 weeks ago
#2

Update unsupported image format tests to use TGA instead of AVIF

Trac ticket:
https://core.trac.wordpress.org/ticket/64225
https://core.trac.wordpress.org/ticket/63167

Updated REST API test methods using the unsupported image format to test unsupported logic checks

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


8 weeks ago
#3

Adding PHPUnit tests for get_post_states function

Trac ticket:
https://core.trac.wordpress.org/ticket/64225
https://core.trac.wordpress.org/ticket/63167

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


8 weeks ago
#4

MySQL 9.5 is the most recent innovation release. This should be tested against appropriately.

Trac ticket: Core-64225

#5 @desrosj
8 weeks ago

In 61245:

Build/Test Tools: Add MySQL 9.5 to test strategies.

MySQL 9.5 is the most recent innovation release. This updates the GitHub Actions workflows testing against innovation release versions to use this new version.

See #64225.

@desrosj commented on PR #10519:


8 weeks ago
#6

Merged in r61245.

@westonruter commented on PR #10060:


6 weeks ago
#7

@paulbonneau There's a merge conflict. Could you resolve?

@paulbonneau commented on PR #10060:


6 weeks ago
#8

@paulbonneau There's a merge conflict. Could you resolve?

Hi @westonruter, the merge conflict has been resolved

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


3 weeks ago
#9

These tests failed with semantically equivalent HTML while working on https://github.com/WordPress/wordpress-develop/pull/10639.

assertEqualHTML makes the tests more robust.

Trac ticket: https://core.trac.wordpress.org/ticket/64225

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


3 weeks ago
#10

Fix class names or filename to match PHPUnit expectations.

PHPUnit can be run with a filename argument:

phpunit [options] UnitTest.php

However, certain test files and test suite class names do not align with PHPUnit expectations and it may fail to run any tests, for example:

./vendor/bin/phpunit tests/phpunit/tests/rest-api/rest-controller.php

Class rest-controller could not be found in /Users/jonsurrell/a8c/wordpress-develop/trunk/tests/phpunit/tests/rest-api/rest-controller.php

Trac ticket: https://core.trac.wordpress.org/ticket/64225

#11 @SergeyBiryukov
3 weeks ago

In 61391:

Tests: Use assertEqualHTML() in Script Modules HTML tests.

This aims to make the tests more robust.

Follow-up to [58579].

Props jonsurrell.
See #64225.

@SergeyBiryukov commented on PR #10642:


3 weeks ago
#12

Thanks for the PR! Merged in r61391.

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


3 weeks ago
#14

These tests failed with semantically equivalent HTML while working on https://github.com/WordPress/wordpress-develop/pull/10641.

assertEqualHTML makes the tests more resilient to semantically irrelevant changes.

Trac ticket: https://core.trac.wordpress.org/ticket/64225

#15 @SergeyBiryukov
3 weeks ago

In 61392:

Tests: Use assertEqualHTML() in styles HTML tests.

This aims to make the tests more robust.

Follow-up to [287/tests], [749/tests], [25786], [31031], [36550], [46164], [48937], [52036], [61084], [61391].

Props jonsurrell.
See #64225.

@SergeyBiryukov commented on PR #10644:


3 weeks ago
#16

Thanks for the PR! Merged in r61392.

#18 @SergeyBiryukov
2 weeks ago

In 61394:

Tests: Update scripts tests to use semantic HTML comparison.

This aims to make the tests more robust.

Follow-up to [50167], [60295], [61391], [61392].

Props jonsurrell.
See #64225.

@SergeyBiryukov commented on PR #10649:


2 weeks ago
#19

Thanks for the PR! Merged in r61394.

#20 @SergeyBiryukov
2 weeks ago

In 61395:

Tests: Correst some test class names per the naming conventions.

Follow-up to [50167], [50409], [56748].

See #64225.

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


2 weeks ago
#21

These tests failed with semantically equivalent HTML while working on https://github.com/WordPress/wordpress-develop/pull/10656.

assertEqualHTML makes the tests more robust.

Trac ticket: https://core.trac.wordpress.org/ticket/64225

#22 @jonsurrell
11 days ago

In 61409:

Tests: Update fonts tests to use semantic HTML comparison.

This aims to make the tests more robust.

Follow-up to [60295], [61391], [61392].

Props jonsurrell.
See #64225.

@jonsurrell commented on PR #10657:


11 days ago
#23

Merged in r61409.

#24 @SergeyBiryukov
3 days ago

In 61423:

Tests: Reset environment before performing assertions in populate_network() tests.

This aims to avoid affecting other tests in case of failure.

Follow-up to [60954], [61420].

See #64225.

Note: See TracTickets for help on using tickets.