Changeset 60253 for trunk/tests/phpunit/tests/customize/manager.php
- Timestamp:
- 05/26/2025 02:34:12 PM (9 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/customize/manager.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/manager.php
r57242 r60253 28 28 29 29 /** 30 * Second admin user ID. 31 * 32 * @var int 33 */ 34 protected static $other_admin_user_id; 35 36 /** 30 37 * Subscriber user ID. 31 38 * … … 47 54 */ 48 55 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 49 self::$subscriber_user_id = $factory->user->create( array( 'role' => 'subscriber' ) ); 50 self::$admin_user_id = $factory->user->create( array( 'role' => 'administrator' ) ); 56 self::$subscriber_user_id = $factory->user->create( array( 'role' => 'subscriber' ) ); 57 self::$admin_user_id = $factory->user->create( array( 'role' => 'administrator' ) ); 58 self::$other_admin_user_id = $factory->user->create( array( 'role' => 'administrator' ) ); 51 59 } 52 60 … … 154 162 public function test_constructor_deferred_changeset_uuid() { 155 163 wp_set_current_user( self::$admin_user_id ); 156 $other_admin_user_id = self:: factory()->user->create( array( 'role' => 'admin' ) );164 $other_admin_user_id = self::$other_admin_user_id; 157 165 158 166 $data = array( … … 1255 1263 public function test_save_changeset_post_without_kses_corrupting_json() { 1256 1264 global $wp_customize; 1257 $lesser_admin_user_id = self:: factory()->user->create( array( 'role' => 'administrator' ) );1265 $lesser_admin_user_id = self::$other_admin_user_id; 1258 1266 1259 1267 $uuid = wp_generate_uuid4(); … … 1500 1508 add_theme_support( 'custom-background' ); 1501 1509 wp_set_current_user( self::$admin_user_id ); 1502 $other_admin_user_id = self:: factory()->user->create( array( 'role' => 'administrator' ) );1510 $other_admin_user_id = self::$other_admin_user_id; 1503 1511 1504 1512 $uuid = wp_generate_uuid4(); … … 1715 1723 add_theme_support( 'custom-background' ); 1716 1724 wp_set_current_user( self::$admin_user_id ); 1717 $other_admin_user_id = self:: factory()->user->create( array( 'role' => 'administrator' ) );1725 $other_admin_user_id = self::$other_admin_user_id; 1718 1726 1719 1727 $uuid = wp_generate_uuid4(); … … 1878 1886 array( 1879 1887 'autosave' => true, 1880 'user_id' => self:: factory()->user->create( array( 'role' => 'administrator' ) ),1888 'user_id' => self::$other_admin_user_id, 1881 1889 ) 1882 1890 ); … … 3010 3018 */ 3011 3019 public function test_return_url() { 3012 wp_set_current_user( self:: factory()->user->create( array( 'role' => 'author' ) ));3020 wp_set_current_user( self::$subscriber_user_id ); 3013 3021 $this->assertSame( home_url( '/' ), $this->manager->get_return_url() ); 3014 3022
Note: See TracChangeset
for help on using the changeset viewer.