Make WordPress Core


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

    r35225 r35242  
    1313        register_taxonomy( 'wptests_tax', 'post' );
    1414
    15         $terms = self::$factory->term->create_many( 2, array(
     15        $terms = self::factory()->term->create_many( 2, array(
    1616            'taxonomy' => 'wptests_tax',
    1717        ) );
    1818
    19         $p = self::$factory->post->create();
     19        $p = self::factory()->post->create();
    2020
    2121        wp_set_object_terms( $p, array( $terms[0] ), 'wptests_tax' );
Note: See TracChangeset for help on using the changeset viewer.