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/comment/getCommentExcerpt.php

    r35225 r35242  
    1515
    1616    public function test_get_comment_excerpt() {
    17         $comment_id = self::$factory->comment->create( array(
     17        $comment_id = self::factory()->comment->create( array(
    1818            'comment_content' => self::$bacon_comment
    1919        ) );
     
    2525
    2626    public function test_get_comment_excerpt_filtered() {
    27         $comment_id = self::$factory->comment->create( array(
     27        $comment_id = self::factory()->comment->create( array(
    2828            'comment_content' => self::$bacon_comment
    2929        ) );
Note: See TracChangeset for help on using the changeset viewer.