Changeset 52010 for trunk/tests/phpunit/tests/post/wpInsertPost.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/wpInsertPost.php
r51568 r52010 30 30 } 31 31 32 static function tear_down_after_class() {32 public static function tear_down_after_class() { 33 33 $role = get_role( 'administrator' ); 34 34 $role->remove_cap( 'publish_mapped_meta_caps' ); … … 38 38 } 39 39 40 function set_up() {40 public function set_up() { 41 41 parent::set_up(); 42 42 … … 69 69 * @ticket 11863 70 70 */ 71 function test_trashing_a_post_should_add_trashed_suffix_to_post_name() {71 public function test_trashing_a_post_should_add_trashed_suffix_to_post_name() { 72 72 $trashed_about_page_id = self::factory()->post->create( 73 73 array( … … 100 100 * @ticket 11863 101 101 */ 102 function test_trashed_posts_original_post_name_should_be_reassigned_after_untrashing() {102 public function test_trashed_posts_original_post_name_should_be_reassigned_after_untrashing() { 103 103 $about_page_id = self::factory()->post->create( 104 104 array( … … 117 117 * @ticket 11863 118 118 */ 119 function test_creating_a_new_post_should_add_trashed_suffix_to_post_name_of_trashed_posts_with_the_desired_slug() {119 public function test_creating_a_new_post_should_add_trashed_suffix_to_post_name_of_trashed_posts_with_the_desired_slug() { 120 120 $trashed_about_page_id = self::factory()->post->create( 121 121 array( … … 141 141 * @ticket 11863 142 142 */ 143 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() {143 public 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 144 $about_page_id = self::factory()->post->create( 145 145 array( … … 175 175 * @dataProvider data_various_post_statuses 176 176 */ 177 function test_untrashing_a_post_should_always_restore_it_to_draft_status( $post_status ) {177 public function test_untrashing_a_post_should_always_restore_it_to_draft_status( $post_status ) { 178 178 $page_id = self::factory()->post->create( 179 179 array( … … 193 193 * @dataProvider data_various_post_statuses 194 194 */ 195 function test_wp_untrash_post_status_filter_restores_post_to_correct_status( $post_status ) {195 public function test_wp_untrash_post_status_filter_restores_post_to_correct_status( $post_status ) { 196 196 add_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 ); 197 197 … … 216 216 * @return array Array of test arguments. 217 217 */ 218 function data_various_post_types() {218 public function data_various_post_types() { 219 219 return array( 220 220 array( … … 235 235 * @return array Array of test arguments. 236 236 */ 237 function data_various_post_statuses() {237 public function data_various_post_statuses() { 238 238 return array( 239 239 array( … … 258 258 * @dataProvider data_various_post_types 259 259 */ 260 function test_contributor_cannot_set_post_slug( $post_type ) {260 public function test_contributor_cannot_set_post_slug( $post_type ) { 261 261 wp_set_current_user( self::$user_ids['contributor'] ); 262 262 … … 297 297 * @dataProvider data_various_post_types 298 298 */ 299 function test_administrator_can_set_post_slug( $post_type ) {299 public function test_administrator_can_set_post_slug( $post_type ) { 300 300 wp_set_current_user( self::$user_ids['administrator'] ); 301 301 … … 338 338 * @ticket 42464 339 339 */ 340 function test_administrator_cannot_set_post_slug_on_post_type_they_cannot_publish() {340 public function test_administrator_cannot_set_post_slug_on_post_type_they_cannot_publish() { 341 341 wp_set_current_user( self::$user_ids['administrator'] ); 342 342 … … 374 374 * @ticket 25347 375 375 */ 376 function test_scheduled_post_with_a_past_date_should_be_published() {376 public function test_scheduled_post_with_a_past_date_should_be_published() { 377 377 378 378 $now = new DateTimeImmutable( 'now', new DateTimeZone( 'UTC' ) );
Note: See TracChangeset
for help on using the changeset viewer.