Changeset 51869 for trunk/tests/phpunit/tests/multisite/network.php
- Timestamp:
- 09/25/2021 01:27:47 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/network.php
r51568 r51869 11 11 class Tests_Multisite_Network extends WP_UnitTestCase { 12 12 protected $plugin_hook_count = 0; 13 protected $suppress = false;14 13 15 14 protected static $different_network_id; 16 15 protected static $different_site_ids = array(); 17 16 18 function set_up() {19 global $wpdb;20 parent::set_up();21 $this->suppress = $wpdb->suppress_errors();22 }23 24 17 function tear_down() { 25 global $wpdb, $current_site; 26 $wpdb->suppress_errors( $this->suppress ); 18 global $current_site; 27 19 $current_site->id = 1; 28 20 parent::tear_down(); … … 591 583 */ 592 584 public function test_wpmu_create_blog_updates_correct_network_site_count() { 585 global $wpdb; 586 593 587 $original_count = get_blog_count( self::$different_network_id ); 594 588 595 $site_id = wpmu_create_blog( 'example.org', '/', '', 1, array(), self::$different_network_id ); 589 $suppress = $wpdb->suppress_errors(); 590 $site_id = wpmu_create_blog( 'example.org', '/', '', 1, array(), self::$different_network_id ); 591 $wpdb->suppress_errors( $suppress ); 596 592 597 593 $result = get_blog_count( self::$different_network_id );
Note: See TracChangeset
for help on using the changeset viewer.