Changeset 57680
- Timestamp:
- 02/21/2024 05:33:54 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/wpInsertPost.php
r56548 r57680 129 129 $this->assertSame( $data['post_title'], $post->post_title ); 130 130 $this->assertSame( $data['post_status'], $post->post_status ); 131 $this->assert Equals($data['post_author'], $post->post_author );131 $this->assertSame( (string) $data['post_author'], $post->post_author ); 132 132 133 133 // Test cache state. … … 676 676 677 677 $post = get_post( $post_id ); 678 $this->assert Equals(self::$user_ids['editor'], $post->post_author );678 $this->assertSame( (string) self::$user_ids['editor'], $post->post_author ); 679 679 $this->assertSame( $title, $post->post_title ); 680 680 } … … 788 788 $post_id = self::factory()->post->create( array( 'post_author' => 0 ) ); 789 789 790 $this->assert Equals( 0, get_post( $post_id )->post_author );790 $this->assertSame( '0', get_post( $post_id )->post_author ); 791 791 } 792 792 … … 799 799 $post_id = self::factory()->post->create( array( 'post_author' => null ) ); 800 800 801 $this->assert Equals(self::$user_ids['editor'], get_post( $post_id )->post_author );801 $this->assertSame( (string) self::$user_ids['editor'], get_post( $post_id )->post_author ); 802 802 } 803 803 … … 917 917 // Validate that the post has had the default category assigned again. 918 918 $this->assertCount( 1, $assigned_terms ); 919 $this->assert Equals(get_option( 'default_category' ), $assigned_terms[0]->term_id );919 $this->assertSame( (int) get_option( 'default_category' ), $assigned_terms[0]->term_id ); 920 920 } 921 921
Note: See TracChangeset
for help on using the changeset viewer.