Make WordPress Core


Ignore:
Timestamp:
10/17/2015 06:02:16 PM (9 years ago)
Author:
wonderboymusic
Message:

Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop.

Props nerrad, wonderboymusic.
See #30017, #33968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/DimComment.php

    r35225 r35242  
    2727    public function setUp() {
    2828        parent::setUp();
    29         $post_id = self::$factory->post->create();
    30         $this->_comments = self::$factory->comment->create_post_comments( $post_id, 15 );
     29        $post_id = self::factory()->post->create();
     30        $this->_comments = self::factory()->comment->create_post_comments( $post_id, 15 );
    3131        $this->_comments = array_map( 'get_comment', $this->_comments );
    3232    }
Note: See TracChangeset for help on using the changeset viewer.