WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 2 days ago

#54245 assigned defect (bug)

Partially add unit tests for WP Upgrader

Reported by: jipmoors Owned by: hellofromTonya
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-unit-tests has-patch
Focuses: Cc:

Description

During the Yoast contributor day, me and Karlijn Bok (will add user profile later) have been working on adding unit tests to the WP Upgrader class.

This does not add full coverage so it should not close #53997

PR: https://github.com/WordPress/wordpress-develop/pull/1751
Related ticket: #53997

Change History (9)

#1 @SergeyBiryukov
7 weeks ago

  • Milestone changed from Awaiting Review to 5.9

#2 @jipmoors
7 weeks ago

Additionally good to note; the total file has around 52% line-coverage due to accidental coverage from other classes.

I have not determined which tests these were - if somebody does; these could be improved by specifying better @covers tags on the methods or classes.

#3 @hellofromTonya
7 weeks ago

  • Owner set to hellofromTonya
  • Status changed from new to assigned

This ticket was mentioned in PR #1751 on WordPress/wordpress-develop by moorscode.


7 weeks ago

  • Keywords has-patch added

This PR was created during the contributor day at Yoast on october 8th.
The focus of me and https://github.com/karlijnbok was to create test coverage for the WP Upgrader classes.

We've chosen the WP_Upgrader class to start off with, as this is a base class for different more specific upgrader classes.

As we both did not have a lot of recent experience in these classes, we decided to start with the simplest methods and work our way up.

We've added some small code adjustments to have better type safety.

The overal line-coverage of the class has increased to 24%.
We did not run branch or path coverage yet.

The restore_temp_backup has not fully been covered yet, running a coverage report will show this.

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

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


2 weeks ago

This ticket was mentioned in Slack in #core-auto-updates by afragen. View the logs.


2 weeks ago

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


2 weeks ago

#8 @hellofromTonya
2 days ago

  • Milestone changed from 5.9 to 6.0

5.9 Beta 1 is starting in the next 20ish minutes. Didn't get time in the cycle to review the PR properly. Moving to 6.0.

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


2 days ago

Note: See TracTickets for help on using tickets.