Changeset 65284
- Timestamp:
- 11/05/2026 11:35:32 PM (33 hours ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 27 edited
-
comment/query.php (modified) (1 diff)
-
post.php (modified) (1 diff)
-
post/getBodyClass.php (modified) (1 diff)
-
post/getLastPostDate.php (modified) (1 diff)
-
post/getLastPostModified.php (modified) (1 diff)
-
post/getPageByPath.php (modified) (1 diff)
-
post/getPages.php (modified) (1 diff)
-
post/getPostClass.php (modified) (1 diff)
-
post/metaRevisions.php (modified) (1 diff)
-
post/nav-menu.php (modified) (1 diff)
-
post/randomablePostType.php (modified) (1 diff)
-
post/types.php (modified) (1 diff)
-
post/updateTermCountOnTransitionPostStatus.php (modified) (1 diff)
-
post/wpPublishPost.php (modified) (1 diff)
-
query/cacheResults.php (modified) (1 diff)
-
query/conditionals.php (modified) (1 diff)
-
query/fieldsClause.php (modified) (1 diff)
-
query/isTerm.php (modified) (1 diff)
-
query/lazyLoadTermMeta.php (modified) (1 diff)
-
query/postStatus.php (modified) (1 diff)
-
query/results.php (modified) (1 diff)
-
query/search.php (modified) (1 diff)
-
query/taxQuery.php (modified) (1 diff)
-
user/countUserPosts.php (modified) (1 diff)
-
user/query.php (modified) (1 diff)
-
user/queryCache.php (modified) (1 diff)
-
user/theAuthorPosts.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/query.php
r65026 r65284 26 26 27 27 public function tear_down() { 28 unregister_post_type( 'post-type-1' );29 unregister_post_type( 'post-type-2' );30 unregister_post_type( 'post-type-3' );31 32 28 unset( $this->to_exclude ); 33 29 parent::tear_down(); -
trunk/tests/phpunit/tests/post.php
r65243 r65284 59 59 public static function wpTearDownAfterClass() { 60 60 remove_role( 'grammarian' ); 61 }62 63 /**64 * Tear down after each test.65 */66 public function tear_down() {67 unregister_post_type( 'restless' );68 unregister_post_type( 'new_post_type' );69 unregister_taxonomy( 'new_tag' );70 _unregister_post_status( 'test' );71 72 parent::tear_down();73 61 } 74 62 -
trunk/tests/phpunit/tests/post/getBodyClass.php
r64975 r65284 22 22 23 23 public function tear_down() { 24 unregister_taxonomy( 'wptests_tax' );25 26 24 if ( get_stylesheet() !== $this->original_stylesheet ) { 27 25 switch_theme( $this->original_stylesheet ); -
trunk/tests/phpunit/tests/post/getLastPostDate.php
r64975 r65284 5 5 */ 6 6 class Tests_Post_GetLastPostDate extends WP_UnitTestCase { 7 8 public function tear_down() {9 unregister_post_type( 'book' );10 11 parent::tear_down();12 }13 7 14 8 /** -
trunk/tests/phpunit/tests/post/getLastPostModified.php
r64975 r65284 5 5 */ 6 6 class Tests_Post_GetLastPostModified extends WP_UnitTestCase { 7 8 public function tear_down() {9 unregister_post_type( 'book' );10 11 parent::tear_down();12 }13 7 14 8 /** -
trunk/tests/phpunit/tests/post/getPageByPath.php
r65030 r65284 5 5 */ 6 6 class Tests_Post_GetPageByPath extends WP_UnitTestCase { 7 public function tear_down() {8 unregister_post_type( 'wptests_pt' );9 10 parent::tear_down();11 }12 13 7 /** 14 8 * @ticket 15665 -
trunk/tests/phpunit/tests/post/getPages.php
r65030 r65284 41 41 ) 42 42 ); 43 }44 45 public function tear_down() {46 _unregister_post_status( 'foo' );47 unregister_post_type( 'wptests_pt' );48 49 parent::tear_down();50 43 } 51 44 -
trunk/tests/phpunit/tests/post/getPostClass.php
r64864 r65284 11 11 parent::set_up(); 12 12 $this->post_id = self::factory()->post->create(); 13 }14 15 /**16 * Tear down after each test.17 */18 public function tear_down() {19 unregister_taxonomy( 'wptests_tax' );20 parent::tear_down();21 13 } 22 14 -
trunk/tests/phpunit/tests/post/metaRevisions.php
r65030 r65284 11 11 */ 12 12 class Tests_Post_MetaRevisions extends WP_UnitTestCase { 13 /**14 * Tear down after each test.15 */16 public function tear_down() {17 unregister_post_type( 'custom_type' );18 parent::tear_down();19 }20 21 13 22 14 /** -
trunk/tests/phpunit/tests/post/nav-menu.php
r65270 r65284 14 14 15 15 $this->menu_id = wp_create_nav_menu( 'foo' ); 16 }17 18 public function tear_down() {19 unregister_post_type( 'fooo-bar-baz' );20 unregister_post_type( 'books' );21 unregister_taxonomy( 'wptests_tax' );22 23 parent::tear_down();24 16 } 25 17 -
trunk/tests/phpunit/tests/post/randomablePostType.php
r65030 r65284 28 28 29 29 /** 30 * Tear down after each test.31 */32 public function tear_down(): void {33 unregister_post_type( 'wptests_pt' );34 unregister_post_type( 'wptests_noarchive' );35 parent::tear_down();36 }37 38 /**39 30 * @dataProvider data_built_in_post_types 40 31 * -
trunk/tests/phpunit/tests/post/types.php
r65270 r65284 37 37 38 38 $this->post_type = 'foo1'; 39 }40 41 /**42 * Tear down after each test.43 */44 public function tear_down() {45 unregister_post_type( 'foo' );46 unregister_post_type( 'bar' );47 unregister_post_type( 'book' );48 unregister_post_type( 'magazine' );49 unregister_post_type( 'shelf' );50 unregister_post_type( 'cpt' );51 unregister_post_type( $this->post_type );52 parent::tear_down();53 39 } 54 40 -
trunk/tests/phpunit/tests/post/updateTermCountOnTransitionPostStatus.php
r65025 r65284 54 54 55 55 /** 56 * Tear down after each test.57 */58 public function tear_down() {59 unregister_taxonomy( 'category_with_pending' );60 _unregister_post_status( 'counted' );61 parent::tear_down();62 }63 64 /**65 56 * Test that the term count is updated when a post is published. 66 57 * -
trunk/tests/phpunit/tests/post/wpPublishPost.php
r64865 r65284 21 21 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 22 22 self::$auto_draft_id = $factory->post->create( array( 'post_status' => 'auto-draft' ) ); 23 }24 25 /**26 * Tear down after each test.27 */28 public function tear_down() {29 unregister_taxonomy( 'tax_51292' );30 parent::tear_down();31 23 } 32 24 -
trunk/tests/phpunit/tests/query/cacheResults.php
r65030 r65284 72 72 ) 73 73 ); 74 }75 76 public function tear_down() {77 unregister_taxonomy( 'wptests_tax1' );78 parent::tear_down();79 74 } 80 75 -
trunk/tests/phpunit/tests/query/conditionals.php
r65270 r65284 39 39 create_initial_taxonomies(); 40 40 flush_rewrite_rules(); 41 }42 43 public function tear_down() {44 unregister_post_type( 'ptawtq' );45 unregister_post_type( 'thearray' );46 unregister_post_type( 'test_hierarchical' );47 parent::tear_down();48 41 } 49 42 -
trunk/tests/phpunit/tests/query/fieldsClause.php
r64840 r65284 44 44 } 45 45 46 public function tear_down() {47 unregister_post_type( 'wptests_pt' );48 parent::tear_down();49 }50 51 46 /** 52 47 * Tests limiting the WP_Query fields to the ID and parent sub-set. -
trunk/tests/phpunit/tests/query/isTerm.php
r65270 r65284 59 59 } 60 60 61 /**62 * Tear down after each test.63 */64 public function tear_down() {65 unregister_taxonomy( 'testtax' );66 unregister_taxonomy( 'testtax2' );67 parent::tear_down();68 }69 70 61 public function test_tag_action_tax() { 71 62 // Tag with taxonomy added. -
trunk/tests/phpunit/tests/query/lazyLoadTermMeta.php
r64865 r65284 39 39 } 40 40 } 41 }42 43 public function tear_down() {44 unregister_taxonomy( 'wptests_tax' );45 parent::tear_down();46 41 } 47 42 -
trunk/tests/phpunit/tests/query/postStatus.php
r64975 r65284 87 87 parent::set_up(); 88 88 self::register_custom_post_objects(); 89 }90 91 public function tear_down() {92 unregister_post_type( 'foo_pt' );93 unregister_post_type( 'wptests_pt1' );94 unregister_post_type( 'wptests_pt2' );95 _unregister_post_status( 'foo' );96 _unregister_post_status( 'foo_ps' );97 _unregister_post_status( 'privatefoo' );98 99 parent::tear_down();100 89 } 101 90 -
trunk/tests/phpunit/tests/query/results.php
r64975 r65284 300 300 unset( $this->q ); 301 301 $this->q = new WP_Query(); 302 }303 304 public function tear_down() {305 unregister_post_type( 'handbook' );306 307 parent::tear_down();308 302 } 309 303 -
trunk/tests/phpunit/tests/query/search.php
r64840 r65284 18 18 19 19 public function tear_down() { 20 unregister_post_type( $this->post_type );21 20 unset( $this->q ); 22 21 -
trunk/tests/phpunit/tests/query/taxQuery.php
r65026 r65284 6 6 */ 7 7 class Tests_Query_TaxQuery extends WP_UnitTestCase { 8 /**9 * Tear down after each test.10 */11 public function tear_down() {12 unregister_taxonomy( 'wptests_tax' );13 unregister_taxonomy( 'wptests_tax1' );14 unregister_taxonomy( 'wptests_tax2' );15 unregister_taxonomy( 'foo' );16 unregister_taxonomy( 'foo1' );17 unregister_taxonomy( 'bar' );18 unregister_post_type( 'wptests_cpt1' );19 20 parent::tear_down();21 }22 23 8 public function test_tax_query_single_query_single_term_field_slug() { 24 9 $t = self::factory()->term->create( -
trunk/tests/phpunit/tests/user/countUserPosts.php
r64839 r65284 59 59 } 60 60 61 public function tear_down() {62 unregister_post_type( 'wptests_pt' );63 parent::tear_down();64 }65 66 61 public function test_count_user_posts_post_type_should_default_to_post() { 67 62 $this->assertSame( '4', count_user_posts( self::$user_id ) ); -
trunk/tests/phpunit/tests/user/query.php
r65025 r65284 48 48 ) 49 49 ); 50 }51 52 /**53 * Tear down after each test.54 */55 public function tear_down() {56 unregister_post_type( 'wptests_pt_public' );57 unregister_post_type( 'wptests_pt_private' );58 59 parent::tear_down();60 50 } 61 51 -
trunk/tests/phpunit/tests/user/queryCache.php
r65073 r65284 72 72 ) 73 73 ); 74 }75 76 public function tear_down() {77 unregister_post_type( 'wptests_pt_public' );78 parent::tear_down();79 74 } 80 75 -
trunk/tests/phpunit/tests/user/theAuthorPosts.php
r64984 r65284 70 70 */ 71 71 public function tear_down() { 72 unregister_post_type( 'wptests_cpt' );73 72 unset( $GLOBALS['post'], $GLOBALS['authordata'] ); 74 73
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)