Changeset 41861 for trunk/tests/phpunit/tests/multisite/getMainSiteId.php
- Timestamp:
- 10/14/2017 10:41:15 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/getMainSiteId.php
r41380 r41861 106 106 return 333; 107 107 } 108 109 /** 110 * @ticket 41936 111 */ 112 public function test_get_main_site_id_with_property_value() { 113 global $current_site; 114 115 $original_main_site_id = $current_site->blog_id; 116 $current_site->blog_id = '123'; 117 118 $result = get_main_site_id(); 119 120 $current_site->blog_id = $original_main_site_id; 121 122 $this->assertSame( 123, $result ); 123 } 124 125 /** 126 * @ticket 41936 127 */ 128 public function test_get_main_site_id_filtered_with_property_value() { 129 global $current_site; 130 131 $original_main_site_id = $current_site->blog_id; 132 $current_site->blog_id = '123'; 133 134 add_filter( 'pre_get_main_site_id', array( $this, 'filter_get_main_site_id' ) ); 135 $result = get_main_site_id(); 136 137 $current_site->blog_id = $original_main_site_id; 138 139 $this->assertSame( 333, $result ); 140 } 108 141 } 109 142
Note: See TracChangeset
for help on using the changeset viewer.