Skip the 'mark spammy subscribers' test if there is no user_status column [MAILPOET-2150]
This commit is contained in:
@@ -284,6 +284,12 @@ class WPTest extends \MailPoetTest {
|
||||
|
||||
function testItMarksSpammySubscribersWithUserStatus2AsUnconfirmed() {
|
||||
global $wpdb;
|
||||
$column_exists = $wpdb->query(sprintf('SHOW COLUMNS FROM `%s` LIKE "user_status"', $wpdb->users));
|
||||
if (!$column_exists) {
|
||||
// This column is deprecated in WP, is no longer used by the core
|
||||
// and either may not be present, or may be removed in the future.
|
||||
return false;
|
||||
}
|
||||
$random_number = rand();
|
||||
$id = $this->insertUser($random_number);
|
||||
$subscriber = Subscriber::createOrUpdate([
|
||||
|
Reference in New Issue
Block a user