Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (3 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods.

Adds a private visibility to helper methods within test classes.

Renames callbacks and helpers that previously started with a _ prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit.

Props costdev, jrf, hellofromTonya.
Fixes #54177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/wpPublishPost.php

    r49603 r52010  
    2727     * @ticket 51292
    2828     */
    29     function test_wp_publish_post_respects_current_categories() {
     29    public function test_wp_publish_post_respects_current_categories() {
    3030        $post_id     = self::$auto_draft_id;
    3131        $category_id = $this->factory->term->create( array( 'taxonomy' => 'category' ) );
     
    4848     * @ticket 51292
    4949     */
    50     function test_wp_publish_post_adds_default_category() {
     50    public function test_wp_publish_post_adds_default_category() {
    5151        $post_id = self::$auto_draft_id;
    5252
     
    6868     * @ticket 51292
    6969     */
    70     function test_wp_publish_post_adds_default_category_when_tagged() {
     70    public function test_wp_publish_post_adds_default_category_when_tagged() {
    7171        $post_id = self::$auto_draft_id;
    7272        $tag_id  = $this->factory->term->create( array( 'taxonomy' => 'post_tag' ) );
     
    8989     * @ticket 51292
    9090     */
    91     function test_wp_publish_post_respects_current_terms() {
     91    public function test_wp_publish_post_respects_current_terms() {
    9292        // Create custom taxonomy to test with.
    9393        register_taxonomy(
     
    124124     * @ticket 51292
    125125     */
    126     function test_wp_publish_post_adds_default_term() {
     126    public function test_wp_publish_post_adds_default_term() {
    127127        // Create custom taxonomy to test with.
    128128        register_taxonomy(
Note: See TracChangeset for help on using the changeset viewer.