WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 11 days ago

#51802 new task (blessed)

Unit test improvements for 5.7

Reported by: SergeyBiryukov Owned by:
Milestone: 5.7 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

Previously:

This ticket is for various fixes and improvements in PHPUnit tests that don't have a more specific ticket.

Change History (16)

This ticket was mentioned in PR #759 on WordPress/wordpress-develop by peterwilsoncc.


8 weeks ago

  • Keywords has-patch has-unit-tests added

Trac ticket:

#2 @peterwilsoncc
7 weeks ago

In 49696:

Build/Test Tools: Remove unused posts from AJAX test setUp().

Removes the creation of five posts from the AJAX test suite setUp() function, replacing it with a shared fixture only where required.

See #51802.

This ticket was mentioned in PR #766 on WordPress/wordpress-develop by peterwilsoncc.


7 weeks ago

Trac ticket:

#4 @peterwilsoncc
7 weeks ago

In 49697:

Build/Test Tools: Use dataProviders for some kses tests.

Refactor several kses tests to use dataProviers rather than looping through assertions.

See #51802.

#5 @SergeyBiryukov
6 weeks ago

In 49757:

Tests: Correct @ticket references in some test files.

See #51802.

#6 @peterwilsoncc
6 weeks ago

In 49758:

Docs, Tests: Correctly capitalize JavaScript.

Correct Javascript to JavaScript within Wordpress core ;)

See #51800, #51802.

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


5 weeks ago

Trac ticket:

#8 @desrosj
5 weeks ago

In 49796:

Build/Test Tools: Remove PHPUnit 3.6.x specific settings from the multisite configuration.

In PHPUnit 3.6.x, exclude and file paths were required to be relative to the checkout root. This changed in PHPUnit 4 when the path requirements were changed require them to be relative to the configuration file.

Since PHPUnit 3.6.x is only used to test on PHP 5.2 in older branches and is no longer supported, these can be safely removed from the configuration file.

See #51802.

#10 @peterwilsoncc
4 weeks ago

In 49848:

Tests: Use shared post fixture in comment template tests.

See #51802.

#11 @peterwilsoncc
4 weeks ago

In 49849:

Tests: Revert use of shared post fixture in comment template tests.

Removes code throwing a fatal in PHP 8.

Reverts [49848] from trunk.
See #51802.

#12 @johnbillion
4 weeks ago

In 49857:

Build/Test Tools: Don't mark the Tests_Cache::test_flush() test as risky when running the test suite with an object cache in place.

See #51802

#13 @SergeyBiryukov
4 weeks ago

In 49863:

Tests: Use shared post fixture in comment template tests.

This reinstates [49848], previously reverted in [49849], with the addition of static keyword for the wpSetUpBeforeClass() method, allowing the tests to pass on PHP 8.

Props peterwilsoncc.
See #51802.

This ticket was mentioned in PR #837 on WordPress/wordpress-develop by peterwilsoncc.


3 weeks ago

This is broken by it might be something else is broken.

https://core.trac.wordpress.org/ticket/51802

This ticket was mentioned in PR #851 on WordPress/wordpress-develop by peterwilsoncc.


12 days ago

#16 @peterwilsoncc
11 days ago

In 49932:

Tests: Increase use of shared fixtures in capability checks.

See #51802.

Note: See TracTickets for help on using tickets.