mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Build/Test Tools: Introduce skipWithoutMultisite() and skipWithMultisite() methods into the test suite.
This brings much needed uniformity to test skipping when a test requires Multisite or when a test should be excluded from running when Multisite is enabled. Used in conjunction with the `@group ms-required` and `@group ms-excluded` notation, this removes a significant number of skipped tests from the default test suite run. Fixes #40531 git-svn-id: https://develop.svn.wordpress.org/trunk@40543 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -12,10 +12,7 @@ class Tests_User_CountUsers extends WP_UnitTestCase {
|
||||
* @group ms-excluded
|
||||
*/
|
||||
public function test_count_users_is_accurate( $strategy ) {
|
||||
|
||||
if ( is_multisite() ) {
|
||||
$this->markTestSkipped( 'Test does not run on multisite' );
|
||||
}
|
||||
$this->skipWithMultisite();
|
||||
|
||||
// Setup users
|
||||
$admin = self::factory()->user->create( array(
|
||||
@@ -63,10 +60,7 @@ class Tests_User_CountUsers extends WP_UnitTestCase {
|
||||
* @dataProvider data_count_users_strategies
|
||||
*/
|
||||
public function test_count_users_multisite_is_accurate( $strategy ) {
|
||||
|
||||
if ( ! is_multisite() ) {
|
||||
$this->markTestSkipped( 'Test requires multisite' );
|
||||
}
|
||||
$this->skipWithoutMultisite();
|
||||
|
||||
// Setup users
|
||||
$admin = self::factory()->user->create( array(
|
||||
|
||||
Reference in New Issue
Block a user