Changeset 53787
- Timestamp:
- 07/27/2022 03:41:30 PM (2 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post.php
r53785 r53787 148 148 self::factory()->post->create( 149 149 array( 150 'post_type' => $post_type, 151 'post_author' => self::$editor_id, 150 'post_type' => $post_type, 152 151 ) 153 152 ); … … 168 167 3, 169 168 array( 170 'post_type' => $post_type, 171 'post_author' => self::$editor_id, 169 'post_type' => $post_type, 172 170 ) 173 171 ); -
trunk/tests/phpunit/tests/post/wpInsertPost.php
r53785 r53787 171 171 172 172 $data = array( 173 'post_author' => self::$user_ids['editor'],174 173 'post_status' => 'publish', 175 174 'post_content' => 'content', … … 189 188 $this->assertSame( $data['post_title'], $post->post_title ); 190 189 $this->assertSame( 'future', $post->post_status ); 191 $this->assertEquals( $data['post_author'], $post->post_author );192 190 $this->assertSame( $data['post_date'], $post->post_date ); 193 191 … … 205 203 206 204 $data = array( 207 'post_author' => self::$user_ids['editor'],208 205 'post_status' => 'publish', 209 206 'post_content' => 'content', … … 248 245 249 246 $data = array( 250 'post_author' => self::$user_ids['editor'],251 247 'post_status' => 'publish', 252 248 'post_content' => 'content', … … 288 284 289 285 $data = array( 290 'post_author' => self::$user_ids['editor'],291 286 'post_status' => 'draft', 292 287 'post_content' => 'content', … … 306 301 $this->assertSame( $data['post_title'], $post->post_title ); 307 302 $this->assertSame( 'draft', $post->post_status ); 308 $this->assertEquals( $data['post_author'], $post->post_author );309 303 $this->assertSame( $data['post_date'], $post->post_date ); 310 304 … … 321 315 322 316 $data = array( 323 'post_author' => self::$user_ids['editor'],324 317 'post_status' => 'publish', 325 318 'post_content' => 'content', … … 362 355 363 356 $data = array( 364 'post_author' => self::$user_ids['editor'],365 357 'post_status' => 'publish', 366 358 'post_content' => "{$status}_content", … … 414 406 415 407 $data = array( 416 'post_author' => self::$user_ids['editor'],417 408 'post_status' => 'private', 418 409 'post_content' => 'content', … … 432 423 $this->assertSame( $data['post_title'], $post->post_title ); 433 424 $this->assertSame( 'private', $post->post_status ); 434 $this->assertEquals( $data['post_author'], $post->post_author );435 425 $this->assertSame( $data['post_date'], $post->post_date ); 436 426 … … 446 436 public function test_vb_insert_invalid_date() { 447 437 $data = array( 448 'post_author' => self::$user_ids['editor'],449 438 'post_status' => 'publish', 450 439 'post_content' => 'content', … … 469 458 470 459 $data = array( 471 'post_author' => self::$user_ids['editor'],472 460 'post_status' => 'publish', 473 461 'post_content' => 'content', … … 589 577 590 578 $data = array( 591 'post_author' => self::$user_ids['editor'],592 579 'post_status' => 'publish', 593 580 'post_content' => 'content', … … 619 606 620 607 $data = array( 621 'post_author' => self::$user_ids['editor'],622 608 'post_status' => 'publish', 623 609 'post_content' => 'content', … … 702 688 $post_id = self::factory()->post->create( 703 689 array( 704 'post_author' => self::$user_ids['editor'],705 690 'post_status' => 'publish', 706 691 'post_content' => 'content', … … 720 705 $post_id = self::factory()->post->create( 721 706 array( 722 'post_author' => self::$user_ids['editor'],723 707 'post_status' => 'publish', 724 708 'post_content' => 'content', … … 742 726 $post_id = self::factory()->post->create( 743 727 array( 744 'post_author' => self::$user_ids['editor'],745 728 'post_status' => 'publish', 746 729 'post_content' => rand_str(), … … 766 749 $post_id = self::factory()->post->create( 767 750 array( 768 'post_author' => self::$user_ids['editor'],769 751 'post_status' => 'publish', 770 752 'post_content' => rand_str(), … … 832 814 public function test_wp_insert_post_should_respect_post_date_gmt() { 833 815 $data = array( 834 'post_author' => self::$user_ids['editor'],835 816 'post_status' => 'publish', 836 817 'post_content' => 'content', … … 846 827 $this->assertSame( $data['post_content'], $post->post_content ); 847 828 $this->assertSame( $data['post_title'], $post->post_title ); 848 $this->assertEquals( $data['post_author'], $post->post_author );849 829 $this->assertSame( get_date_from_gmt( $data['post_date_gmt'] ), $post->post_date ); 850 830 $this->assertSame( $data['post_date_gmt'], $post->post_date_gmt );
Note: See TracChangeset
for help on using the changeset viewer.