Make WordPress Core


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

    r35225 r35242  
    2323
    2424    function test_get_space_used_switched_site() {
    25         $blog_id = self::$factory->blog->create();
     25        $blog_id = self::factory()->blog->create();
    2626        switch_to_blog( $blog_id );
    2727
     
    3131        while ( 0 != get_space_used() ) {
    3232            restore_current_blog();
    33             $blog_id = self::$factory->blog->create();
     33            $blog_id = self::factory()->blog->create();
    3434            switch_to_blog( $blog_id );
    3535        }
     
    5959        $space_used = get_space_used();
    6060
    61         $blog_id = self::$factory->blog->create();
     61        $blog_id = self::factory()->blog->create();
    6262        switch_to_blog( $blog_id );
    6363
     
    6767        while ( 0 != get_space_used() ) {
    6868            restore_current_blog();
    69             $blog_id = self::$factory->blog->create();
     69            $blog_id = self::factory()->blog->create();
    7070            switch_to_blog( $blog_id );
    7171        }
Note: See TracChangeset for help on using the changeset viewer.