WordPress.org

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/ajax/QuickEdit.php

    r35225 r35242  
    2626        ) );
    2727
    28         $t1 = self::$factory->term->create( array(
     28        $t1 = self::factory()->term->create( array(
    2929            'taxonomy' => 'wptests_tax_1',
    3030        ) );
    31         $t2 = self::$factory->term->create( array(
     31        $t2 = self::factory()->term->create( array(
    3232            'taxonomy' => 'wptests_tax_2',
    3333        ) );
     
    3636        $this->_setRole( 'administrator' );
    3737
    38         $post = self::$factory->post->create_and_get( array(
     38        $post = self::factory()->post->create_and_get( array(
    3939            'post_author' => get_current_user_id(),
    4040        ) );
Note: See TracChangeset for help on using the changeset viewer.