Make WordPress Core


Ignore:
Timestamp:
09/06/2022 10:09:49 PM (3 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/link/getPostTypeArchiveLink.php

    r50454 r54090  
    2020     */
    2121    public function test_get_post_archive_link_with_post_archive_on_a_blog_page() {
    22         $page_for_posts = $this->factory->post->create(
     22        $page_for_posts = self::factory()->post->create(
    2323            array(
    2424                'post_title' => 'blog-page',
Note: See TracChangeset for help on using the changeset viewer.