Changeset 63781
- Timestamp:
- 09/21/2026 06:49:19 PM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-term-meta-fields.php
r61424 r63781 12 12 protected static $category_id; 13 13 protected static $customtax_term_id; 14 protected static $editor_id; 14 15 15 16 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { … … 25 26 self::$category_id = $factory->category->create(); 26 27 self::$customtax_term_id = $factory->term->create( array( 'taxonomy' => 'customtax' ) ); 28 self::$editor_id = $factory->user->create( array( 'role' => 'editor' ) ); 27 29 } 28 30 … … 31 33 wp_delete_term( self::$category_id, 'category' ); 32 34 wp_delete_term( self::$customtax_term_id, 'customtax' ); 35 self::delete_user( self::$editor_id ); 33 36 34 37 unregister_taxonomy( 'customtax' ); … … 199 202 protected function grant_write_permission() { 200 203 // Ensure we have write permission. 201 $user = self::factory()->user->create( 202 array( 203 'role' => 'editor', 204 ) 205 ); 206 wp_set_current_user( $user ); 204 wp_set_current_user( self::$editor_id ); 207 205 } 208 206
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)