- Timestamp:
- 04/23/2017 09:57:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-users-controller.php
r40520 r40543 997 997 */ 998 998 public function test_create_new_network_user_on_site_does_not_add_user_to_sub_site() { 999 if ( ! is_multisite() ) { 1000 $this->markTestSkipped( 'Test requires multisite.' ); 1001 } 999 $this->skipWithoutMultisite(); 1002 1000 1003 1001 $this->allow_user_to_manage_multisite(); … … 1029 1027 */ 1030 1028 public function test_create_new_network_user_on_sub_site_adds_user_to_site() { 1031 if ( ! is_multisite() ) { 1032 $this->markTestSkipped( 'Test requires multisite.' ); 1033 } 1029 $this->skipWithoutMultisite(); 1034 1030 1035 1031 $this->allow_user_to_manage_multisite(); … … 1065 1061 */ 1066 1062 public function test_create_existing_network_user_on_sub_site_has_error() { 1067 if ( ! is_multisite() ) { 1068 $this->markTestSkipped( 'Test requires multisite.' ); 1069 } 1063 $this->skipWithoutMultisite(); 1070 1064 1071 1065 $this->allow_user_to_manage_multisite(); … … 1455 1449 */ 1456 1450 public function test_update_user_role_invalid_privilege_deescalation() { 1457 if ( is_multisite() ) { 1458 return $this->markTestSkipped( 'Test only intended for single site.' ); 1459 } 1451 $this->skipWithMultisite(); 1460 1452 1461 1453 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) ); … … 1488 1480 */ 1489 1481 public function test_update_user_role_privilege_deescalation_multisite() { 1490 if ( ! is_multisite() ) { 1491 return $this->markTestSkipped( 'Test only intended for multisite.' ); 1492 } 1482 $this->skipWithoutMultisite(); 1493 1483 1494 1484 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) ); … … 2239 2229 */ 2240 2230 public function test_get_item_from_different_site_as_site_administrator() { 2241 if ( ! is_multisite() ) { 2242 $this->markTestSkipped( 'Test only runs in multisite' ); 2243 } 2231 $this->skipWithoutMultisite(); 2244 2232 2245 2233 switch_to_blog( self::$site ); … … 2261 2249 */ 2262 2250 public function test_get_item_from_different_site_as_network_administrator() { 2263 if ( ! is_multisite() ) { 2264 $this->markTestSkipped( 'Test only runs in multisite' ); 2265 } 2251 $this->skipWithoutMultisite(); 2266 2252 2267 2253 switch_to_blog( self::$site ); … … 2283 2269 */ 2284 2270 public function test_update_item_from_different_site_as_site_administrator() { 2285 if ( ! is_multisite() ) { 2286 $this->markTestSkipped( 'Test only runs in multisite' ); 2287 } 2271 $this->skipWithoutMultisite(); 2288 2272 2289 2273 switch_to_blog( self::$site ); … … 2307 2291 */ 2308 2292 public function test_update_item_from_different_site_as_network_administrator() { 2309 if ( ! is_multisite() ) { 2310 $this->markTestSkipped( 'Test only runs in multisite' ); 2311 } 2293 $this->skipWithoutMultisite(); 2312 2294 2313 2295 switch_to_blog( self::$site ); … … 2331 2313 */ 2332 2314 public function test_delete_item_from_different_site_as_site_administrator() { 2333 if ( ! is_multisite() ) { 2334 $this->markTestSkipped( 'Test only runs in multisite' ); 2335 } 2315 $this->skipWithoutMultisite(); 2336 2316 2337 2317 switch_to_blog( self::$site ); … … 2355 2335 */ 2356 2336 public function test_delete_item_from_different_site_as_network_administrator() { 2357 if ( ! is_multisite() ) { 2358 $this->markTestSkipped( 'Test only runs in multisite' ); 2359 } 2337 $this->skipWithoutMultisite(); 2360 2338 2361 2339 switch_to_blog( self::$site );
Note: See TracChangeset
for help on using the changeset viewer.