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/commentForm.php

    r35225 r35242  
    66class Tests_Comment_CommentForm extends WP_UnitTestCase {
    77    public function test_default_markup_for_submit_button_and_wrapper() {
    8         $p = self::$factory->post->create();
     8        $p = self::factory()->post->create();
    99
    1010        $args = array(
     
    2222
    2323    public function test_custom_submit_button() {
    24         $p = self::$factory->post->create();
     24        $p = self::factory()->post->create();
    2525
    2626        $args = array(
     
    3838
    3939    public function test_custom_submit_field() {
    40         $p = self::$factory->post->create();
     40        $p = self::factory()->post->create();
    4141
    4242        $args = array(
     
    5858     */
    5959    public function test_submit_button_and_submit_field_should_fall_back_on_defaults_when_filtered_defaults_do_not_contain_the_keys() {
    60         $p = self::$factory->post->create();
     60        $p = self::factory()->post->create();
    6161
    6262        $args = array(
Note: See TracChangeset for help on using the changeset viewer.