mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-12 16:44:34 +00:00
Build/Test Tools: Introduce ms-required and ms-excluded groups for tests.
Tests in the `ms-excluded` group are now excluded when running tests with multisite enabled, and tests in the `ms-required` group are excluded when running tests without multisite enabled. The end result is a significantly reduced number of skipped tests polluting PHPUnit's output, which means verbose mode can be used to more easily see which tests are skipped or incomplete, and why. See #40531 git-svn-id: https://develop.svn.wordpress.org/trunk@40520 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
* @group user
|
||||
*/
|
||||
class Tests_User_WpAuthenticateSpamCheck extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @group ms-excluded
|
||||
*/
|
||||
function test_wp_authenticate_spam_check_returns_user_when_single_site() {
|
||||
if ( is_multisite() ) {
|
||||
$this->markTestSkipped( 'This test applies to single site only.' );
|
||||
@@ -17,6 +21,9 @@ class Tests_User_WpAuthenticateSpamCheck extends WP_UnitTestCase {
|
||||
$this->assertEquals( $user->user_login, $actual_user->user_login );
|
||||
}
|
||||
|
||||
/**
|
||||
* @group ms-required
|
||||
*/
|
||||
function test_wp_authenticate_spam_check_returns_user_when_not_flagged() {
|
||||
if ( ! is_multisite() ) {
|
||||
$this->markTestSkipped( 'This test applies to multisite only.' );
|
||||
@@ -30,6 +37,9 @@ class Tests_User_WpAuthenticateSpamCheck extends WP_UnitTestCase {
|
||||
$this->assertEquals( $user->user_login, $actual_user->user_login );
|
||||
}
|
||||
|
||||
/**
|
||||
* @group ms-required
|
||||
*/
|
||||
function test_wp_authenticate_spam_check_returns_wp_error_when_flagged() {
|
||||
if ( ! is_multisite() ) {
|
||||
$this->markTestSkipped( 'This test applies to multisite only.' );
|
||||
|
||||
Reference in New Issue
Block a user