Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#35985 closed task (blessed) (fixed)

Add tests for 'public' and related arguments in register_post_type()

Reported by: drewapicture's profile DrewAPicture Owned by: drewapicture's profile DrewAPicture
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch has-unit-tests
Focuses: Cc:

Description


Attachments (2)

35985.diff (4.4 KB) - added by DrewAPicture 7 years ago.
35985.2.diff (4.4 KB) - added by DrewAPicture 7 years ago.

Download all attachments as: .zip

Change History (4)

@DrewAPicture
7 years ago

@DrewAPicture
7 years ago

#1 @DrewAPicture
7 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 36768:

Posts: Add tests for the cascading fallback behavior of several 'public'-related arguments in register_post_type().

Covers the 'exclude_from_search', 'publicly_queryable', 'show_ui', 'show_in_menu', 'show_in_nav_menus', and 'show_in_admin_bar' arguments, all of which eventually inherit from 'public' if not set.

Fixes #35985.

#2 @jorbin
7 years ago

In 37459:

Correct usage of @Covers for Tests_Post_Types

When @covers is used with a plain alphanumeric string, PHPUnit assumes that it is covering a class. If there is no class, it fails and exits rather than continuing to generate coverage. To cover a global function, the name must start with ::. See https://phpunit.de/manual/5.3/en/appendixes.annotations.html#appendixes.annotations.covers

Introduced in [36768].

Fixes #36867. See #35985

Note: See TracTickets for help on using tickets.