Changeset 50401 for trunk/tests/phpunit/tests/oembed/getResponseData.php
- Timestamp:
- 02/22/2021 01:21:26 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/oembed/getResponseData.php
r48939 r50401 3 3 /** 4 4 * @group oembed 5 * @covers ::get_oembed_response_data 5 6 */ 6 7 class Tests_oEmbed_Response_Data extends WP_UnitTestCase { … … 129 130 } 130 131 132 /** 133 * @ticket 47574 134 */ 135 function test_get_oembed_response_data_with_public_true_custom_post_status() { 136 // Custom status with 'public' => true. 137 register_post_status( 'public', array( 'public' => true ) ); 138 139 $post = self::factory()->post->create_and_get( 140 array( 141 'post_status' => 'public', 142 ) 143 ); 144 145 $this->assertNotFalse( get_oembed_response_data( $post, 100 ) ); 146 } 147 148 /** 149 * @ticket 47574 150 */ 151 function test_get_oembed_response_data_with_public_false_custom_post_status() { 152 // Custom status with 'public' => false. 153 register_post_status( 'private_foo', array( 'public' => false ) ); 154 155 $post = self::factory()->post->create_and_get( 156 array( 157 'post_status' => 'private_foo', 158 ) 159 ); 160 161 $this->assertFalse( get_oembed_response_data( $post, 100 ) ); 162 } 163 164 /** 165 * @ticket 47574 166 */ 167 function test_get_oembed_response_data_with_unregistered_custom_post_status() { 168 $post = self::factory()->post->create_and_get( 169 array( 170 'post_status' => 'unknown_foo', 171 ) 172 ); 173 174 $this->assertFalse( get_oembed_response_data( $post, 100 ) ); 175 } 176 131 177 function test_get_oembed_response_data_maxwidth_too_high() { 132 178 $post = self::factory()->post->create_and_get();
Note: See TracChangeset
for help on using the changeset viewer.