Make WordPress Core


Ignore:
Timestamp:
01/04/2015 08:05:53 PM (10 years ago)
Author:
boonebgorges
Message:

Remove non-built-in post statuses during each unit test teardown.

See #29167.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r30687 r31046  
    4848            $this->reset_post_types();
    4949            $this->reset_taxonomies();
     50            $this->reset_post_statuses();
    5051        }
    5152
     
    106107        }
    107108        create_initial_taxonomies();
     109    }
     110
     111    /**
     112     * Unregister non-built-in post statuses.
     113     */
     114    protected function reset_post_statuses() {
     115        foreach ( get_post_stati( array( '_builtin' => false ) ) as $post_status ) {
     116            _unregister_post_status( $post_status );
     117        }
    108118    }
    109119
Note: See TracChangeset for help on using the changeset viewer.