Changeset 55322
- Timestamp:
- 02/13/2023 07:35:13 PM (2 years ago)
- Location:
- trunk/tests/phpunit/tests/comment
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/wpCommentsPersonalDataEraser.php
r55319 r55322 9 9 class Tests_Comment_wpCommentsPersonalDataEraser extends WP_UnitTestCase { 10 10 11 protected static $post_id; 12 13 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 14 self::$post_id = $factory->post->create(); 15 } 16 11 17 /** 12 18 * The `wp_comments_personal_data_eraser()` function should erase user's comments. … … 16 22 public function test_wp_comments_personal_data_eraser() { 17 23 18 $post_id = self::factory()->post->create();19 24 $user_id = self::factory()->user->create(); 20 25 21 26 $args = array( 22 27 'user_id' => $user_id, 23 'comment_post_ID' => $post_id,28 'comment_post_ID' => self::$post_id, 24 29 'comment_author' => 'Comment Author', 25 30 'comment_author_email' => 'personal@local.host', … … 90 95 public function test_wp_comments_personal_data_eraser_non_empty_first_page_output() { 91 96 92 $post_id = self::factory()->post->create(); 93 $args = array( 94 'comment_post_ID' => $post_id, 97 $args = array( 98 'comment_post_ID' => self::$post_id, 95 99 'comment_author' => 'Comment Author', 96 100 'comment_author_email' => 'personal@local.host', … … 121 125 public function test_wp_comments_personal_data_eraser_empty_second_page_output() { 122 126 123 $post_id = self::factory()->post->create(); 124 $args = array( 125 'comment_post_ID' => $post_id, 127 $args = array( 128 'comment_post_ID' => self::$post_id, 126 129 'comment_author' => 'Comment Author', 127 130 'comment_author_email' => 'personal@local.host', … … 152 155 public function test_wp_anonymize_comment_filter_to_prevent_comment_anonymization() { 153 156 154 $post_id = self::factory()->post->create();155 157 $args = array( 156 'comment_post_ID' => $post_id,158 'comment_post_ID' => self::$post_id, 157 159 'comment_author' => 'Comment Author', 158 160 'comment_author_email' => 'personal@local.host', … … 188 190 public function test_wp_anonymize_comment_filter_to_prevent_comment_anonymization_with_custom_message() { 189 191 190 $post_id = self::factory()->post->create();191 192 $args = array( 192 'comment_post_ID' => $post_id,193 'comment_post_ID' => self::$post_id, 193 194 'comment_author' => 'Comment Author', 194 195 'comment_author_email' => 'personal@local.host', -
trunk/tests/phpunit/tests/comment/wpCommentsPersonalDataExporter.php
r55321 r55322 8 8 */ 9 9 class Tests_Comment_wpCommentsPersonalDataExporter extends WP_UnitTestCase { 10 11 protected static $post_id; 12 13 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 14 self::$post_id = $factory->post->create(); 15 } 10 16 11 17 /**
Note: See TracChangeset
for help on using the changeset viewer.