Split and organize multisite unit tests

* Move `ms.php` to `multisite.php`
* Create `multisite.php` under directories `option/` and `user/` to better match existing structure.
* Create a `multisite/` directory containing `bootstrap.php`, `site.php`, and `network.php` for very multisite specific testing.
* Add unit test groups ms-site, ms-user, ms-option, ms-network, and ms-bootstrap.

Fixes #29896


git-svn-id: https://develop.svn.wordpress.org/trunk@29916 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt
2014-10-16 05:06:22 +00:00
parent 0d58d32462
commit f0b35fe7d5
7 changed files with 1055 additions and 933 deletions
-24
View File
@@ -90,28 +90,4 @@ class Tests_Option_SiteOption extends WP_UnitTestCase {
$this->assertEquals( get_site_option( $option, $default ), $default );
$this->assertFalse( get_site_option( $option ) );
}
/**
* @group multisite
*/
function test_site_notoptions() {
if ( ! is_multisite() ) {
$this->markTestSkipped( 'Should only run in multisite' );
}
global $wpdb;
$notoptions_key = "{$wpdb->siteid}:notoptions";
$_notoptions = wp_cache_get( 'notoptions', 'site-options' );
$this->assertEmpty( $_notoptions );
$_notoptions1 = wp_cache_get( $notoptions_key, 'site-options' );
$this->assertEmpty( $_notoptions1 );
get_site_option( 'burrito' );
$notoptions = wp_cache_get( 'notoptions', 'site-options' );
$this->assertEmpty( $notoptions );
$notoptions1 = wp_cache_get( $notoptions_key, 'site-options' );
$this->assertNotEmpty( $notoptions1 );
}
}