WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/17/2015 06:02:16 PM (4 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/xmlrpc/mw/getPost.php

    r35225 r35242  
    9696        // create attachment
    9797        $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' );
    98         $attachment_id = self::$factory->attachment->create_upload_object( $filename );
     98        $attachment_id = self::factory()->attachment->create_upload_object( $filename );
    9999
    100100        set_post_thumbnail( $this->post_id, $attachment_id );
Note: See TracChangeset for help on using the changeset viewer.