Changeset 51869 for trunk/tests/phpunit/tests/user/multisite.php
- Timestamp:
- 09/25/2021 01:27:47 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/multisite.php
r51568 r51869 11 11 */ 12 12 class Tests_Multisite_User extends WP_UnitTestCase { 13 protected $suppress = false;14 15 function set_up() {16 global $wpdb;17 parent::set_up();18 $this->suppress = $wpdb->suppress_errors();19 }20 21 function tear_down() {22 global $wpdb;23 $wpdb->suppress_errors( $this->suppress );24 parent::tear_down();25 }26 13 27 14 function test_remove_user_from_blog() { … … 396 383 */ 397 384 public function test_add_user_to_blog_invalid_user() { 385 global $wpdb; 386 398 387 $site_id = self::factory()->blog->create(); 399 388 400 $result = add_user_to_blog( 73622, $site_id, 'subscriber' ); 389 $suppress = $wpdb->suppress_errors(); 390 $result = add_user_to_blog( 73622, $site_id, 'subscriber' ); 391 $wpdb->suppress_errors( $suppress ); 401 392 402 393 wp_delete_site( $site_id );
Note: See TracChangeset
for help on using the changeset viewer.