Make WordPress Core


Ignore:
Timestamp:
10/17/2015 06:02:16 PM (10 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/wp/getTerms.php

    r35225 r35242  
    107107        $cat2 = wp_create_category( 'wp.getTerms_' . rand_str( 16 ) );
    108108
    109         self::$factory->post->create_many( 5, array( 'post_category' => array( $cat1 ) ) );
    110         self::$factory->post->create_many( 3, array( 'post_category' => array( $cat2 ) ) );
     109        self::factory()->post->create_many( 5, array( 'post_category' => array( $cat1 ) ) );
     110        self::factory()->post->create_many( 3, array( 'post_category' => array( $cat2 ) ) );
    111111
    112112        $filter = array( 'orderby' => 'count', 'order' => 'DESC' );
Note: See TracChangeset for help on using the changeset viewer.