mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-07 08:07:16 +00:00
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:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user