Make WordPress Core

Opened 7 months ago

Closed 7 months ago

#64026 closed enhancement (duplicate)

Function `get_post_states` doesn't have unit tests

Reported by: paulbonneau's profile paulbonneau Owned by:
Milestone: Priority: normal
Severity: trivial Version:
Component: Posts, Post Types Keywords: reporter-feedback has-unit-tests
Focuses: tests Cc:

Description

Hi everyone,

I noticed that the get_post_states ( currently in /wp-admin/includes/template.php l.2293) doesn't have unit tests.

I think it could be useful to provide tests for this function.

I will try to provide a patch / PR as soon as possible. If someone can do it quicker don't hesitate to do so !

Change History (3)

#1 @SirLouen
7 months ago

  • Keywords reporter-feedback added

@paulbonneau add a GitHub PR directly linking to here #63167
Nowadays, it is the fastest way to get unit tests up, by far.

Please, ping me here with the PR link when you have added them to this ticket.

PS: I still have some tickets from you in my backlog to review. I'm currently focusing on some Mail component things before 6.9, and I'm in a rush trying to have them sorted at the earliest, I will get back to them when I finish.

Last edited 7 months ago by SirLouen (previous) (diff)

#2 @paulbonneau
7 months ago

  • Keywords has-unit-tests added; needs-unit-tests removed

Hello @SirLouen,

Thank you for your attention to my ticket and for the informations.

@paulbonneau add a GitHub PR directly linking to here #63167
Nowadays, it is the fastest way to get unit tests up, by far.

Please, ping me here with the PR link when you have added them to this ticket.

Ok, PR https://github.com/WordPress/wordpress-develop/pull/10060 is attached to the #63167 Trac ticket.

PS: I still have some tickets from you in my backlog to review. I'm currently focusing on some > Mail component things before 6.9, and I'm in a rush trying to have them sorted at the earliest,
I will get back to them when I finish.

Ok thank you. Are there ways I could be helpful on 6.9 release ?

#3 @SirLouen
7 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version trunk deleted

Duplicate of #63167.

Ok, @paulbonneau I'm reviewing this there.
Also, there are many errors in the unit tests. Can you check this?

I'm closing this post, let's continue directly in the PR.

Note: See TracTickets for help on using tickets.