Skip to:
Content

bbPress.org

Changeset 5687


Ignore:
Timestamp:
04/19/2015 11:18:50 AM (10 years ago)
Author:
netweb
Message:

Tests: Add factory support for parsing meta arguments from forum, topic, and reply ::create_object factories in BBP_UnitTestCase testcases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/factory.php

    r5677 r5687  
    2828
    2929    public function create_object( $args ) {
    30         return bbp_insert_forum( $args );
     30        $forum_meta = isset( $args['forum_meta'] ) ? $args['forum_meta'] : array();
     31        $forum_data = bbp_insert_forum( $args, $forum_meta );
     32        return $forum_data;
    3133    }
    3234
     
    5355
    5456    public function create_object( $args ) {
    55         return bbp_insert_topic( $args );
     57        $topic_meta = isset( $args['topic_meta'] ) ? $args['topic_meta'] : array();
     58        $topic_data = bbp_insert_topic( $args, $topic_meta );
     59        return $topic_data;
    5660    }
    5761
     
    7781
    7882    public function create_object( $args ) {
    79         return bbp_insert_reply( $args );
     83        $reply_meta = isset( $args['reply_meta'] ) ? $args['reply_meta'] : array();
     84        $reply_data = bbp_insert_reply( $args, $reply_meta );
     85        return $reply_data;
    8086    }
    8187
Note: See TracChangeset for help on using the changeset viewer.