Changeset 41380 for trunk/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 09/15/2017 11:14:49 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r41058 r41380 12 12 protected $suppress = false; 13 13 protected static $network_ids; 14 protected static $site_ids; 14 15 15 16 function setUp() { … … 34 35 } 35 36 unset( $id ); 37 38 self::$site_ids = array( 39 'make.wordpress.org/' => array( 'domain' => 'make.wordpress.org', 'path' => '/', 'site_id' => self::$network_ids['make.wordpress.org/'] ), 40 'make.wordpress.org/foo/' => array( 'domain' => 'make.wordpress.org', 'path' => '/foo/', 'site_id' => self::$network_ids['make.wordpress.org/'] ), 41 ); 42 43 foreach ( self::$site_ids as &$id ) { 44 $id = $factory->blog->create( $id ); 45 } 46 unset( $id ); 36 47 } 37 48 38 49 public static function wpTearDownAfterClass() { 39 50 global $wpdb; 51 52 foreach( self::$site_ids as $id ) { 53 wpmu_delete_blog( $id, true ); 54 } 40 55 41 56 foreach( self::$network_ids as $id ) { … … 1029 1044 return $original_value; 1030 1045 } 1046 1047 /** 1048 * @ticket 29684 1049 */ 1050 public function test_is_main_site_different_network() { 1051 $this->assertTrue( is_main_site( self::$site_ids['make.wordpress.org/'], self::$network_ids['make.wordpress.org/'] ) ); 1052 } 1053 1054 /** 1055 * @ticket 29684 1056 */ 1057 public function test_is_main_site_different_network_random_site() { 1058 $this->assertFalse( is_main_site( self::$site_ids['make.wordpress.org/foo/'], self::$network_ids['make.wordpress.org/'] ) ); 1059 } 1031 1060 } 1032 1061
Note: See TracChangeset
for help on using the changeset viewer.