Make WordPress Core

#64026 closed enhancement (duplicate)

Function `get_post_states` doesn't have unit tests

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

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
13 months ago

  • Keywords reporter-feedback added

@paulbonneau add a GitHub PR directly linking to here
https://core.trac.wordpress.org/ticket/63167
Nowadays, it is the fastest way to get unit tests up, by far.

Ping me here 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.

Version 0, edited 13 months ago by SirLouen (next)

#2 @paulbonneau
12 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
12 months ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed
  • Version trunk

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.