WordPress.org

Make WordPress Core


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

    r35225 r35242  
    1010        register_taxonomy( 'wptests_tax2', 'post' );
    1111
    12         $t1 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax1' ) );
    13         $t2 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax2' ) );
     12        $t1 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax1' ) );
     13        $t2 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax2' ) );
    1414
    1515        $object_id = 567;
     
    3434        register_taxonomy( 'wptests_tax3', 'post' );
    3535
    36         $t1 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax1' ) );
    37         $t2 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax2' ) );
    38         $t3 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax3' ) );
     36        $t1 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax1' ) );
     37        $t2 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax2' ) );
     38        $t3 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax3' ) );
    3939
    4040        $object_id = 567;
Note: See TracChangeset for help on using the changeset viewer.