Register post types before each unit test

Fixes #6501

see
https://core.trac.wordpress.org/changeset/29860/trunk/tests/phpunit/incl
udes/testcase.php, apparently we were #doingitwrong  🙈
This commit is contained in:
Max Rice 2014-10-09 15:24:37 -04:00
parent bc1ea4fdea
commit b06e1982c9
1 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,10 @@ class WC_Unit_Test_Case extends WP_UnitTestCase {
add_filter( 'woocommerce_session_handler', array( $this, 'set_mock_session_handler' ) );
$this->setOutputCallback( array( $this, 'filter_output' ) );
// register post types before each test
WC_Post_types::register_post_types();
WC_Post_types::register_taxonomies();
}
/**