Make WordPress Core


Ignore:
Timestamp:
09/06/2022 10:03:10 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Correctly use the factory method.

This replaces all non-static calls to the WP_UnitTestCase_Base::factory() method with static function calls, since the method is declared as static.

This is a consistency improvement for the test suite.

Follow up to [35225], [35242], [49603], [54087].

Props jrf.
See #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/context.php

    r52010 r54088  
    3737                );
    3838
    39                 $post = $this->factory()->post->create_and_get( $args );
     39                $post = self::factory()->post->create_and_get( $args );
    4040                setup_postdata( $post );
    4141        }
Note: See TracChangeset for help on using the changeset viewer.