Ticket #39265: updated_files_form_post_folder.patch
File updated_files_form_post_folder.patch, 6.1 KB (added by , 4 years ago) |
---|
-
tests/phpunit/tests/post/filtering.php
8 8 * 9 9 * @group post 10 10 * @group formatting 11 * 12 * @covers ::wp_insert_post 11 13 */ 12 14 class Tests_Post_Filtering extends WP_UnitTestCase { 13 15 function setUp() { … … 22 24 parent::tearDown(); 23 25 } 24 26 25 // A simple test to make sure unclosed tags are fixed. 27 /** 28 * A simple test to make sure unclosed tags are fixed. 29 */ 26 30 function test_post_content_unknown_tag() { 27 31 28 32 $content = <<<EOF … … 39 43 $this->assertSame( $expected, $post->post_content ); 40 44 } 41 45 42 // A simple test to make sure unbalanced tags are fixed. 46 /** 47 * A simple test to make sure unbalanced tags are fixed. 48 */ 43 49 function test_post_content_unbalanced_tag() { 44 50 45 51 $content = <<<EOF … … 56 62 $this->assertSame( $expected, $post->post_content ); 57 63 } 58 64 59 // Test KSES filtering of disallowed attribute. 65 /** 66 * Test KSES filtering of disallowed attribute. 67 */ 60 68 function test_post_content_disallowed_attr() { 61 69 62 70 $content = <<<EOF … … 93 101 $this->assertSame( $expected, $post->post_content ); 94 102 } 95 103 96 // Make sure unbalanced tags are untouched when the balance option is off. 104 /** 105 * Make sure unbalanced tags are untouched when the balance option is off. 106 */ 97 107 function test_post_content_nobalance_nextpage_more() { 98 108 99 109 update_option( 'use_balanceTags', 0 ); -
tests/phpunit/tests/post/wpInsertPost.php
67 67 68 68 /** 69 69 * @ticket 11863 70 * 71 * @covers ::wp_trash_post 70 72 */ 71 73 function test_trashing_a_post_should_add_trashed_suffix_to_post_name() { 72 74 $trashed_about_page_id = self::factory()->post->create( … … 82 84 83 85 /** 84 86 * @ticket 11863 87 * 88 * @covers ::wp_trash_post 85 89 */ 86 90 public function test_trashed_suffix_should_be_added_to_post_with__trashed_in_slug() { 87 91 $trashed_about_page_id = self::factory()->post->create( … … 98 102 99 103 /** 100 104 * @ticket 11863 105 * 106 * @covers ::wp_untrash_post 101 107 */ 102 108 function test_trashed_posts_original_post_name_should_be_reassigned_after_untrashing() { 103 109 $about_page_id = self::factory()->post->create( … … 115 121 116 122 /** 117 123 * @ticket 11863 124 * 125 * @covers ::wp_insert_post 118 126 */ 119 127 function test_creating_a_new_post_should_add_trashed_suffix_to_post_name_of_trashed_posts_with_the_desired_slug() { 120 128 $trashed_about_page_id = self::factory()->post->create( … … 139 147 140 148 /** 141 149 * @ticket 11863 150 * 151 * @covers ::wp_untrash_post 142 152 */ 143 153 function test_untrashing_a_post_with_a_stored_desired_post_name_should_get_its_post_name_suffixed_if_another_post_has_taken_the_desired_post_name() { 144 154 $about_page_id = self::factory()->post->create( … … 173 183 /** 174 184 * @ticket 23022 175 185 * @dataProvider data_various_post_statuses 186 * 187 * @covers ::wp_untrash_post 176 188 */ 177 189 function test_untrashing_a_post_should_always_restore_it_to_draft_status( $post_status ) { 178 190 $page_id = self::factory()->post->create( … … 191 203 /** 192 204 * @ticket 23022 193 205 * @dataProvider data_various_post_statuses 206 * 207 * @covers ::wp_untrash_post 194 208 */ 195 209 function test_wp_untrash_post_status_filter_restores_post_to_correct_status( $post_status ) { 196 210 add_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 ); … … 256 270 * 257 271 * @ticket 42464 258 272 * @dataProvider data_various_post_types 273 * 274 * @covers ::wp_insert_post 275 * @covers ::wp_update_post 259 276 */ 260 277 function test_contributor_cannot_set_post_slug( $post_type ) { 261 278 wp_set_current_user( self::$user_ids['contributor'] ); … … 295 312 * 296 313 * @ticket 42464 297 314 * @dataProvider data_various_post_types 315 * 316 * @covers ::wp_insert_post 317 * @covers ::wp_update_post 298 318 */ 299 319 function test_administrator_can_set_post_slug( $post_type ) { 300 320 wp_set_current_user( self::$user_ids['administrator'] ); … … 336 356 * These assertions failed prior to ticket #42464. 337 357 * 338 358 * @ticket 42464 359 * 360 * @covers ::wp_insert_post 361 * @covers ::wp_update_post 339 362 */ 340 363 function test_administrator_cannot_set_post_slug_on_post_type_they_cannot_publish() { 341 364 wp_set_current_user( self::$user_ids['administrator'] ); … … 372 395 373 396 /** 374 397 * @ticket 25347 398 * 399 * @covers ::wp_insert_post 375 400 */ 376 401 function test_scheduled_post_with_a_past_date_should_be_published() { 377 402 -
tests/phpunit/tests/post/wpPublishPost.php
25 25 * Ensure wp_publish_post does not add default category in error. 26 26 * 27 27 * @ticket 51292 28 * 29 * @covers ::wp_publish_post 28 30 */ 29 31 function test_wp_publish_post_respects_current_categories() { 30 32 $post_id = self::$auto_draft_id; … … 44 46 /** 45 47 * Ensure wp_publish_post adds default category. 46 48 * 49 * @ticket 51292 50 * 47 51 * @covers ::wp_publish_post 48 * @ticket 5129249 52 */ 50 53 function test_wp_publish_post_adds_default_category() { 51 54 $post_id = self::$auto_draft_id; … … 64 67 /** 65 68 * Ensure wp_publish_post adds default category when tagged. 66 69 * 70 * @ticket 51292 71 * 67 72 * @covers ::wp_publish_post 68 * @ticket 5129269 73 */ 70 74 function test_wp_publish_post_adds_default_category_when_tagged() { 71 75 $post_id = self::$auto_draft_id; … … 85 89 /** 86 90 * Ensure wp_publish_post does not add default term in error. 87 91 * 92 * @ticket 51292 93 * 88 94 * @covers ::wp_publish_post 89 * @ticket 5129290 95 */ 91 96 function test_wp_publish_post_respects_current_terms() { 92 97 // Create custom taxonomy to test with. … … 119 124 120 125 /** 121 126 * Ensure wp_publish_post adds default term. 127 * 128 * @ticket 51292 122 129 * 123 130 * @covers ::wp_publish_post 124 * @ticket 51292125 131 */ 126 132 function test_wp_publish_post_adds_default_term() { 127 133 // Create custom taxonomy to test with.