Changeset 59700 for trunk/tests/phpunit/tests/post/types.php
- Timestamp:
- 01/24/2025 01:30:27 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/types.php
r58211 r59700 647 647 $this->assertTrue( post_type_supports( 'foo', 'autosave' ), 'Post type should still support autosaves.' ); 648 648 } 649 650 /** 651 * @group oembed 652 * @ticket 35567 653 */ 654 public function test_register_post_type_is_embeddable_should_default_to_value_of_public() { 655 $post_type = register_post_type( $this->post_type ); 656 $this->assertFalse( $post_type->embeddable, 'Non-public post type should not be embeddable by default' ); 657 658 $post_type = register_post_type( $this->post_type, array( 'public' => true ) ); 659 $this->assertTrue( $post_type->embeddable, 'Public post type should be embeddable by default' ); 660 } 661 662 /** 663 * @group oembed 664 * @ticket 35567 665 */ 666 public function test_register_post_type_override_is_embeddable() { 667 $post_type = register_post_type( $this->post_type, array( 'embeddable' => true ) ); 668 $this->assertTrue( $post_type->embeddable, 'Post type should be embeddable even though it is not public' ); 669 670 $post_type = register_post_type( 671 $this->post_type, 672 array( 673 'public' => true, 674 'embeddable' => false, 675 ) 676 ); 677 $this->assertFalse( $post_type->embeddable, 'Post type should not be embeddable even though it is public' ); 678 } 649 679 }
Note: See TracChangeset
for help on using the changeset viewer.