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/functions/getArchives.php

    r35225 r35242  
    8888
    8989    function test_wp_get_archives_order() {
    90         self::$factory->post->create( array( 'post_type' => 'post', 'post_author' => '1', 'post_date' => '2012-10-23 19:34:42' ) );
     90        self::factory()->post->create( array( 'post_type' => 'post', 'post_author' => '1', 'post_date' => '2012-10-23 19:34:42' ) );
    9191
    9292        $date_full = date( 'F Y' );
     
    111111        register_post_type( 'taco', array( 'public' => true ) );
    112112
    113         self::$factory->post->create( array(
     113        self::factory()->post->create( array(
    114114            'post_type' => 'taco',
    115115            'post_author' => '1',
Note: See TracChangeset for help on using the changeset viewer.