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/general/archives.php

    r35225 r35242  
    1717        global $wpdb;
    1818
    19         self::$factory->post->create_many( 3, array( 'post_type' => 'post' ) );
     19        self::factory()->post->create_many( 3, array( 'post_type' => 'post' ) );
    2020        wp_cache_delete( 'last_changed', 'posts' );
    2121        $this->assertFalse( wp_cache_get( 'last_changed', 'posts' ) );
Note: See TracChangeset for help on using the changeset viewer.