WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 2 months ago

Last modified 6 weeks ago

#51216 closed enhancement (fixed)

Speed up tests for wp_allow_comment

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

Description

The fixtures in Tests_Comment_WpAllowComment are stored in static properties. But they are (re)created in the setUp() method before every test run.

We should use shared fixtures to speed up this test case.

Change History (4)

This ticket was mentioned in PR #512 on WordPress/wordpress-develop by fklein-lu.


3 months ago

  • Keywords has-patch has-unit-tests added

The fixtures in Tests_Comment_WpAllowComment are stored in static properties. But they are (re)created in the setUp() method before every test run.

We should use shared fixtures to speed up this test case.

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

#2 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 5.6
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
2 months ago

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

In 49002:

Tests: Speed up tests for wp_allow_comment() by reusing shared fixtures.

Props frank-klein.
Fixes #51216.

Note: See TracTickets for help on using tickets.