@@ -75,9 +75,7 @@ function test_merging_existing_meta_values() {
7575 * @group ms-excluded
7676 */
7777 public function test_admin_bar_contains_correct_links_for_users_with_no_role () {
78- if ( is_multisite () ) {
79- $ this ->markTestSkipped ( 'Test does not run in multisite ' );
80- }
78+ $ this ->skipWithMultisite ();
8179
8280 $ this ->assertFalse ( user_can ( self ::$ no_role_id , 'read ' ) );
8381
@@ -104,9 +102,7 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role() {
104102 * @group ms-excluded
105103 */
106104 public function test_admin_bar_contains_correct_links_for_users_with_role () {
107- if ( is_multisite () ) {
108- $ this ->markTestSkipped ( 'Test does not run in multisite ' );
109- }
105+ $ this ->skipWithMultisite ();
110106
111107 $ this ->assertTrue ( user_can ( self ::$ editor_id , 'read ' ) );
112108
@@ -136,9 +132,7 @@ public function test_admin_bar_contains_correct_links_for_users_with_role() {
136132 * @group ms-required
137133 */
138134 public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_blog () {
139- if ( ! is_multisite () ) {
140- $ this ->markTestSkipped ( 'Test only runs in multisite ' );
141- }
135+ $ this ->skipWithoutMultisite ();
142136
143137 $ blog_id = self ::factory ()->blog ->create ( array (
144138 'user_id ' => self ::$ admin_id ,
@@ -187,9 +181,7 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_
187181 * @group ms-required
188182 */
189183 public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_network () {
190- if ( ! is_multisite () ) {
191- $ this ->markTestSkipped ( 'Test only runs in multisite ' );
192- }
184+ $ this ->skipWithoutMultisite ();
193185
194186 $ this ->assertTrue ( user_can ( self ::$ admin_id , 'read ' ) );
195187 $ this ->assertFalse ( user_can ( self ::$ no_role_id , 'read ' ) );
@@ -432,9 +424,7 @@ public function test_admin_bar_has_no_archives_link_for_pages() {
432424 * @group ms-excluded
433425 */
434426 public function test_admin_bar_contains_correct_about_link_for_users_with_role () {
435- if ( is_multisite () ) {
436- $ this ->markTestSkipped ( 'Test does not run in multisite ' );
437- }
427+ $ this ->skipWithMultisite ();
438428
439429 wp_set_current_user ( self ::$ editor_id );
440430
@@ -453,9 +443,7 @@ public function test_admin_bar_contains_correct_about_link_for_users_with_role()
453443 * @group ms-excluded
454444 */
455445 public function test_admin_bar_contains_correct_about_link_for_users_with_no_role () {
456- if ( is_multisite () ) {
457- $ this ->markTestSkipped ( 'Test does not run in multisite ' );
458- }
446+ $ this ->skipWithMultisite ();
459447
460448 wp_set_current_user ( self ::$ no_role_id );
461449
@@ -476,9 +464,7 @@ public function test_admin_bar_contains_correct_about_link_for_users_with_no_rol
476464 * @group ms-required
477465 */
478466 public function test_admin_bar_contains_correct_about_link_for_users_with_no_role_in_multisite () {
479- if ( ! is_multisite () ) {
480- $ this ->markTestSkipped ( 'Test only runs in multisite ' );
481- }
467+ $ this ->skipWithoutMultisite ();
482468
483469 // User is not a member of a site.
484470 remove_user_from_blog ( self ::$ no_role_id , get_current_blog_id () );
@@ -596,9 +582,7 @@ public function test_customize_link() {
596582 * @group ms-required
597583 */
598584 public function test_my_sites_network_menu_for_regular_user () {
599- if ( ! is_multisite () ) {
600- $ this ->markTestSkipped ( 'Test only runs in multisite ' );
601- }
585+ $ this ->skipWithoutMultisite ();
602586
603587 wp_set_current_user ( self ::$ editor_id );
604588
@@ -615,9 +599,7 @@ public function test_my_sites_network_menu_for_regular_user() {
615599 * @group ms-required
616600 */
617601 public function test_my_sites_network_menu_for_super_admin () {
618- if ( ! is_multisite () ) {
619- $ this ->markTestSkipped ( 'Test only runs in multisite ' );
620- }
602+ $ this ->skipWithoutMultisite ();
621603
622604 wp_set_current_user ( self ::$ editor_id );
623605
@@ -636,11 +618,9 @@ public function test_my_sites_network_menu_for_super_admin() {
636618 * @group ms-required
637619 */
638620 public function test_my_sites_network_menu_for_regular_user_with_network_caps () {
639- global $ current_user ;
621+ $ this -> skipWithoutMultisite () ;
640622
641- if ( ! is_multisite () ) {
642- $ this ->markTestSkipped ( 'Test only runs in multisite ' );
643- }
623+ global $ current_user ;
644624
645625 $ network_user_caps = array ( 'manage_network ' , 'manage_network_themes ' , 'manage_network_plugins ' );
646626
0 commit comments