Changeset 37300 for trunk/tests/phpunit/tests/multisite/network.php
- Timestamp:
- 04/22/2016 03:21:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/network.php
r37233 r37300 66 66 function test_get_main_network_id_after_network_delete() { 67 67 global $wpdb, $current_site; 68 68 69 $id = self::factory()->network->create(); 70 $temp_id = $id + 1; 69 71 70 72 $current_site->id = (int) $id; 71 $wpdb->query( "UPDATE {$wpdb->site} SET id=100 WHERE id=1" ); 72 $this->assertEquals( $id, get_main_network_id() ); 73 $wpdb->query( "UPDATE {$wpdb->site} SET id=1 WHERE id=100" ); 73 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->site} SET id=%d WHERE id=1", $temp_id ) ); 74 $main_network_id = get_main_network_id(); 75 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->site} SET id=1 WHERE id=%d", $temp_id ) ); 76 77 $this->assertEquals( $id, $main_network_id ); 74 78 } 75 79
Note: See TracChangeset
for help on using the changeset viewer.