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