#38157 closed enhancement (fixed)
Add tests for get_post_type_labels()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.8 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Posts, Post Types | Keywords: | has-patch has-unit-tests |
| Focuses: | Cc: |
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
9 years ago
#7
@
8 years ago
Hi @swissspidy
I just recalled you comment here on 42044#comment:1 regarding the cleanup, when I skimmed over these methods in [42490] :
test_labels_should_be_added_when_registering_a_post_type() test_label_should_be_derived_from_labels_when_registering_a_post_type() test_should_fall_back_on_defaults_when_filtered_labels_do_not_contain_the_keys
The first one calls unregister_post_type( 'foo' ) before the assertions but the latter two do it afterwards.
Would the note be relevant in this case?
Note: See
TracTickets for help on using
tickets.
IIRC from #38218, some assertions need to be tweaked, but otherwise nothing speaks against adding tests.