Build/Test Tools: Automatically skip tests in the ms-required and ms-excluded groups.

This removes the need to manually call `$this->skipWithMultisite()` and `$this->skipWithoutMultisite()` from within the test when the test only runs without Multisite or only runs on Multisite, respectively.

Props jdgrimes for the suggestion.

Fixes #40531


git-svn-id: https://develop.svn.wordpress.org/trunk@40564 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2017-05-01 20:34:10 +00:00
parent f72ce6dc6e
commit c759785cea
20 changed files with 11 additions and 152 deletions
@@ -41,8 +41,6 @@ class Tests_Link_GetDashboardUrl extends WP_UnitTestCase {
* @group ms-required
*/
public function test_get_dashboard_url_for_network_administrator_with_no_sites() {
$this->skipWithoutMultisite();
grant_super_admin( self::$user_id );
add_filter( 'get_blogs_of_user', '__return_empty_array' );
@@ -60,8 +58,6 @@ class Tests_Link_GetDashboardUrl extends WP_UnitTestCase {
* @group ms-required
*/
public function test_get_dashboard_url_for_administrator_of_different_site() {
$this->skipWithoutMultisite();
$site_id = self::factory()->blog->create( array( 'user_id' => self::$user_id ) );
remove_user_from_blog( self::$user_id, get_current_blog_id() );