You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests: Reset environment before performing assertions in populate_network() tests.
This aims to avoid affecting other tests in case of failure.
Follow-up to [60954], [61420].
See #64225.
git-svn-id: https://develop.svn.wordpress.org/trunk@61423 602fd350-edb4-49c9-b593-d223f7449a82
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->sitemeta} WHERE site_id = %d", $network_id ) );
64
+
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->site} WHERE id = %d", $network_id ) );
65
+
59
66
$this->assertSame( 1, $this->action_counts['before_populate_network'], 'before_populate_network action should fire once' );
60
67
$this->assertSame( 1, $this->action_counts['after_populate_network'], 'after_populate_network action should fire once' );
61
68
62
69
$this->assertSame( $network_id, $this->action_args['before_populate_network']['network_id'], 'Network ID should match in before_populate_network hook' );
63
70
$this->assertSame( $domain, $this->action_args['before_populate_network']['domain'], 'Domain should match in before_populate_network hook' );
64
71
$this->assertSame( $network_id, $this->action_args['after_populate_network']['network_id'], 'Network ID should match in after_populate_network hook' );
65
72
$this->assertSame( $domain, $this->action_args['after_populate_network']['domain'], 'Domain should match in after_populate_network hook' );
0 commit comments