Make WordPress Core


Ignore:
Timestamp:
02/13/2023 07:35:13 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Declare the $post_id property in wp_comments_personal_data_exporter() tests.

Use the same approach in wp_comments_personal_data_eraser() for consistency and to minimize the number of fixtures created in each individual test.

Follow-up to [55319], [55321].

Props hellofromTonya.
See #56793.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/wpCommentsPersonalDataExporter.php

    r55321 r55322  
    88 */
    99class 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        }
    1016
    1117        /**
Note: See TracChangeset for help on using the changeset viewer.