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/user/updateUserCaches.php

    r35225 r35242  
    88        global $wpdb;
    99
    10         $u = self::$factory->user->create();
     10        $u = self::factory()->user->create();
    1111        $raw_userdata = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE ID = %d", $u ) );
    1212
     
    5858        global $wpdb;
    5959
    60         $u = self::$factory->user->create();
     60        $u = self::factory()->user->create();
    6161        $raw_userdata = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE ID = %d", $u ) );
    6262        $user_object = new WP_User( $u );
Note: See TracChangeset for help on using the changeset viewer.