Skip to content

Commit c3d0b32

Browse files
committed
Clean up CustomPostTypesTest post type teardown
1 parent d6b173f commit c3d0b32

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/phpunit/helper-functions/CustomPostTypesTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ class CustomPostTypesTest extends WP_UnitTestCase {
1616
* Unregister test post types after each test.
1717
*/
1818
public function tearDown(): void {
19-
unregister_post_type( 'edac_public_qt' );
2019
if ( post_type_exists( 'edac_public_qt' ) ) {
2120
unregister_post_type( 'edac_public_qt' );
2221
}
22+
if ( post_type_exists( 'edac_public_default' ) ) {
23+
unregister_post_type( 'edac_public_default' );
24+
}
2325
if ( post_type_exists( 'edac_not_queryable' ) ) {
2426
unregister_post_type( 'edac_not_queryable' );
2527
}

0 commit comments

Comments
 (0)