Make WordPress Core


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

    r35225 r35242  
    2929
    3030        $slug = 'ńaș';
    31         $t = self::$factory->term->create( array(
     31        $t = self::factory()->term->create( array(
    3232            'slug' => $slug,
    3333            'taxonomy' => 'wptests_tax',
     
    4545
    4646        register_taxonomy( 'wptests_tax', 'post' );
    47         $t = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );
     47        $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) );
    4848        $term = get_term( $t, 'wptests_tax' );
    4949
     
    6868
    6969        register_taxonomy( 'wptests_tax', 'post' );
    70         $t = self::$factory->term->create( array(
     70        $t = self::factory()->term->create( array(
    7171            'taxonomy' => 'wptests_tax',
    7272            'slug' => 'foo',
Note: See TracChangeset for help on using the changeset viewer.