mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-12 16:44:34 +00:00
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:
@@ -9,8 +9,6 @@ class Tests_User_WpAuthenticateSpamCheck extends WP_UnitTestCase {
|
||||
* @group ms-excluded
|
||||
*/
|
||||
function test_wp_authenticate_spam_check_returns_user_when_single_site() {
|
||||
$this->skipWithMultisite();
|
||||
|
||||
$user_id = self::factory()->user->create( array( 'role' => 'contributor' ) );
|
||||
$user = new WP_User( $user_id );
|
||||
$actual_user = wp_authenticate_spam_check( $user );
|
||||
@@ -23,8 +21,6 @@ class Tests_User_WpAuthenticateSpamCheck extends WP_UnitTestCase {
|
||||
* @group ms-required
|
||||
*/
|
||||
function test_wp_authenticate_spam_check_returns_user_when_not_flagged() {
|
||||
$this->skipWithoutMultisite();
|
||||
|
||||
$user_id = self::factory()->user->create( array( 'role' => 'contributor' ) );
|
||||
$user = new WP_User( $user_id );
|
||||
$actual_user = wp_authenticate_spam_check( $user );
|
||||
@@ -37,8 +33,6 @@ class Tests_User_WpAuthenticateSpamCheck extends WP_UnitTestCase {
|
||||
* @group ms-required
|
||||
*/
|
||||
function test_wp_authenticate_spam_check_returns_wp_error_when_flagged() {
|
||||
$this->skipWithoutMultisite();
|
||||
|
||||
$user_id = self::factory()->user->create( array( 'role' => 'contributor' ) );
|
||||
update_user_status( $user_id, 'spam', 1 );
|
||||
$user = new WP_User( $user_id );
|
||||
|
||||
Reference in New Issue
Block a user