Make WordPress Core


Ignore:
Timestamp:
09/06/2022 10:03:10 PM (2 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/term/isTermPubliclyViewable.php

    r53894 r54088  
    2626     */
    2727    public function test_is_term_publicly_viewable( $taxonomy, $expected ) {
    28         $term_id = $this->factory()->term->create(
     28        $term_id = self::factory()->term->create(
    2929            array(
    3030                'taxonomy' => $taxonomy,
Note: See TracChangeset for help on using the changeset viewer.