mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-23 12:44:30 +00:00
Properly set $subdomain_error to false when applicable in ms_subdomain_constants(). This was previously untestable because it used static vars: use globals instead.
Adds unit test. Fixes #28697. git-svn-id: https://develop.svn.wordpress.org/trunk@29200 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -25,6 +25,17 @@ class Tests_MS extends WP_UnitTestCase {
|
||||
$wpdb->suppress_errors( $this->suppress );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 28697
|
||||
*/
|
||||
function test_ms_subdomain_constants() {
|
||||
global $subdomain_error;
|
||||
|
||||
$this->assertFalse( $subdomain_error );
|
||||
ms_subdomain_constants();
|
||||
$this->assertFalse( $subdomain_error );
|
||||
}
|
||||
|
||||
function test_remove_user_from_blog() {
|
||||
$user1 = $this->factory->user->create_and_get();
|
||||
$user2 = $this->factory->user->create_and_get();
|
||||
|
||||
Reference in New Issue
Block a user