Make WordPress Core


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

Tests: Use the factory method instead of the property.

This replaces all references to the WP_UnitTestCase_Base::$factory property with static function calls to the WP_UnitTestCase_Base::factory() method.

This is a consistency improvement for the test suite.

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

Props jrf.
See #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/query.php

    r53655 r54090  
    16661666    public function test_search_by_display_name_only() {
    16671667
    1668         $new_user1          = $this->factory->user->create(
     1668        $new_user1          = self::factory()->user->create(
    16691669            array(
    16701670                'user_login'   => 'name1',
     
    16941694    public function test_search_by_display_name_only_ignore_others() {
    16951695
    1696         $new_user1          = $this->factory->user->create(
     1696        $new_user1          = self::factory()->user->create(
    16971697            array(
    16981698                'user_login'   => 'Sophia Andresen',
Note: See TracChangeset for help on using the changeset viewer.