Make WordPress Core


Ignore:
Timestamp:
10/17/2015 06:02:16 PM (11 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/post/filtering.php

    r35225 r35242  
    3232EOF;
    3333
    34                 $id = self::$factory->post->create( array( 'post_content' => $content ) );
     34                $id = self::factory()->post->create( array( 'post_content' => $content ) );
    3535                $post = get_post($id);
    3636
    … …  
    4949EOF;
    5050
    51                 $id = self::$factory->post->create( array( 'post_content' => $content ) );
     51                $id = self::factory()->post->create( array( 'post_content' => $content ) );
    5252                $post = get_post($id);
    5353
    … …  
    6666EOF;
    6767
    68                 $id = self::$factory->post->create( array( 'post_content' => $content ) );
     68                $id = self::factory()->post->create( array( 'post_content' => $content ) );
    6969                $post = get_post($id);
    7070
    … …  
    8585EOF;
    8686
    87                 $id = self::$factory->post->create( array( 'post_content' => $content ) );
     87                $id = self::factory()->post->create( array( 'post_content' => $content ) );
    8888                $post = get_post($id);
    8989
    … …  
    105105EOF;
    106106
    107                 $id = self::$factory->post->create( array( 'post_content' => $content ) );
     107                $id = self::factory()->post->create( array( 'post_content' => $content ) );
    108108                $post = get_post($id);
    109109
Note: See TracChangeset for help on using the changeset viewer.