Make WordPress Core


Ignore:
Timestamp:
09/06/2022 10:03:10 PM (21 months 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/user.php

    r53818 r54088  
    16971697        $was_confirmation_email_sent = false;
    16981698
    1699         $user = $this->factory()->user->create_and_get(
     1699        $user = self::factory()->user->create_and_get(
    17001700            array(
    17011701                'user_email' => 'before@example.com',
     
    17341734        $was_confirmation_email_sent = false;
    17351735
    1736         $user = $this->factory()->user->create_and_get(
     1736        $user = self::factory()->user->create_and_get(
    17371737            array(
    17381738                'user_email' => 'before@example.com',
Note: See TracChangeset for help on using the changeset viewer.