Changeset 48937 for trunk/tests/phpunit/tests/user/wpDeleteUser.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/wpDeleteUser.php
r47122 r48937 13 13 function test_get_blogs_of_user() { 14 14 // Logged out users don't have blogs. 15 $this->assert Equals( array(), get_blogs_of_user( 0 ) );15 $this->assertSame( array(), get_blogs_of_user( 0 ) ); 16 16 17 17 $user_id = self::factory()->user->create( array( 'role' => 'subscriber' ) ); 18 18 $blogs = get_blogs_of_user( $user_id ); 19 $this->assert Equals( array( 1 ), array_keys( $blogs ) );19 $this->assertSame( array( 1 ), array_keys( $blogs ) ); 20 20 21 21 // Non-existent users don't have blogs. … … 24 24 $user = new WP_User( $user_id ); 25 25 $this->assertFalse( $user->exists(), 'WP_User->exists' ); 26 $this->assert Equals( array(), get_blogs_of_user( $user_id ) );26 $this->assertSame( array(), get_blogs_of_user( $user_id ) ); 27 27 } 28 28 … … 72 72 73 73 $post = get_post( $post_id ); 74 $this->assert Equals( $post_id, $post->ID );74 $this->assertSame( $post_id, $post->ID ); 75 75 76 76 $post = array( … … 88 88 89 89 $post = get_post( $nav_id ); 90 $this->assert Equals( $nav_id, $post->ID );90 $this->assertSame( $nav_id, $post->ID ); 91 91 92 92 wp_delete_user( $user_id ); … … 99 99 100 100 $this->assertNotNull( get_post( $post_id ) ); 101 $this->assert Equals( 'trash', get_post( $post_id )->post_status );101 $this->assertSame( 'trash', get_post( $post_id )->post_status ); 102 102 // 'nav_menu_item' is `delete_with_user = false` so the nav post should remain published. 103 103 $this->assertNotNull( get_post( $nav_id ) ); 104 $this->assert Equals( 'publish', get_post( $nav_id )->post_status );104 $this->assertSame( 'publish', get_post( $nav_id )->post_status ); 105 105 wp_delete_post( $nav_id, true ); 106 106 $this->assertNull( get_post( $nav_id ) ); … … 150 150 $u_obj = self::factory()->user->create_and_get(); 151 151 $this->assertFalse( wp_delete_user( $u_obj ) ); 152 $this->assert Equals( $u_obj->ID, username_exists( $u_obj->user_login ) );152 $this->assertSame( $u_obj->ID, username_exists( $u_obj->user_login ) ); 153 153 } 154 154 }
Note: See TracChangeset
for help on using the changeset viewer.