Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51216 closed enhancement (fixed)

Speed up tests for wp_allow_comment

Reported by: frank-klein's profile Frank Klein Owned by: sergeybiryukov's profile 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.


4 years ago
#1

  • 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
4 years ago

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

#3 @SergeyBiryukov
4 years 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.