Make WordPress Core


Ignore:
Timestamp:
09/06/2022 10:09:49 PM (4 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/query/noFoundRows.php

    r51462 r54090  
    7474         */
    7575        public function test_no_found_rows_default_with_nopaging_true() {
    76                 $p = $this->factory->post->create();
     76                $p = self::factory()->post->create();
    7777
    7878                $q = new WP_Query(
    … …  
    9191         */
    9292        public function test_no_found_rows_default_with_postsperpage_minus1() {
    93                 $p = $this->factory->post->create();
     93                $p = self::factory()->post->create();
    9494
    9595                $q = new WP_Query(
Note: See TracChangeset for help on using the changeset viewer.