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/auth.php

    r52157 r54088  
    422422            'user_pass'  => 'password',
    423423        );
    424         $this->factory()->user->create( $user_args );
     424        self::factory()->user->create( $user_args );
    425425
    426426        $_POST['log'] = $user_args['user_email'];
     
    437437     */
    438438    public function test_application_password_authentication() {
    439         $user_id = $this->factory()->user->create(
     439        $user_id = self::factory()->user->create(
    440440            array(
    441441                'user_login' => 'http_auth_login',
Note: See TracChangeset for help on using the changeset viewer.