Make WordPress Core

Changeset 64849


Ignore:
Timestamp:
10/27/2026 08:23:34 PM (11 days ago)
Author:
lancewillett
Message:

Tests: Clean up post types in admin post and export tests.

Unregister yes_title, no_title, and wpexport_excluded in the relevant test classes during teardown.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/14927

Props huzaifaalmesbah.
See #65893.

Location:
trunk/tests/phpunit/tests/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/exportWp.php

    r64441 r64849  
    9595        }
    9696
     97        public function tear_down() {
     98                unregister_post_type( 'wpexport_excluded' );
     99
     100                parent::tear_down();
     101        }
     102
    97103        /**
    98104         * @dataProvider data_should_include_attachments
  • trunk/tests/phpunit/tests/admin/includesPost.php

    r64105 r64849  
    2525
    2626                self::$post_id = $factory->post->create();
     27        }
     28
     29        public function tear_down() {
     30                unregister_post_type( 'yes_title' );
     31                unregister_post_type( 'no_title' );
     32
     33                parent::tear_down();
    2734        }
    2835
Note: See TracChangeset for help on using the changeset viewer.