- Timestamp:
- 05/26/2025 02:34:12 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php
r56421 r60253 15 15 16 16 /** 17 * ID of the administrator user. 18 * 19 * @var int 20 */ 21 public static $administrator_id; 22 23 /** 24 * Set up the shared fixture. 25 * 26 * @param WP_UnitTest_Factory $factory Factory instance. 27 */ 28 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 29 self::$administrator_id = $factory->user->create( array( 'role' => 'administrator' ) ); 30 } 31 32 /** 17 33 * Set up a test case. 18 34 * … … 22 38 parent::set_up(); 23 39 require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; 24 wp_set_current_user( self:: factory()->user->create( array( 'role' => 'administrator' ) ));40 wp_set_current_user( self::$administrator_id ); 25 41 26 42 global $wp_customize;
Note: See TracChangeset
for help on using the changeset viewer.