Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/07/2015 09:54:05 AM (9 years ago)
Author:
netweb
Message:

Tests: Update tests to always include a parent topic for replies

This changeset ensures replies always have a parent topic which in turn ensures each reply is created with an accurate menu_order position.

Fixes #2843

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/replies/template/authors.php

    r5723 r5890  
    2828    public function test_bbp_get_reply_author_id() {
    2929        $u = $this->factory->user->create();
     30        $t = $this->factory->topic->create();
    3031        $r = $this->factory->reply->create( array(
     32            'post_parent' => $t,
    3133            'post_author' => $u,
     34            'reply_meta' => array(
     35                'topic_id' => $t,
     36            ),
    3237        ) );
    3338
     
    4449            'display_name' => 'Barry B. Benson',
    4550        ) );
    46 
     51        $t = $this->factory->topic->create();
    4752        $r = $this->factory->reply->create( array(
     53            'post_parent' => $t,
    4854            'post_author' => $u,
     55            'reply_meta' => array(
     56                'topic_id' => $t,
     57            ),
    4958        ) );
    5059
Note: See TracChangeset for help on using the changeset viewer.