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/multisite/network.php

    r53011 r54088  
    562562            $this->assertNull( get_network( $new_network_id ) );
    563563
    564             $new_network = $this->factory()->network->create_and_get();
     564            $new_network = self::factory()->network->create_and_get();
    565565
    566566            // Double-check we got the ID of the new network correct.
Note: See TracChangeset for help on using the changeset viewer.