Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/27/2015 01:07:53 PM (9 years ago)
Author:
netweb
Message:

Tests: Updated bbPress PHPUnit test suite compatibility with upstream WordPress changes.

  • [WP35244] WP_UnitTest_Generator_Sequence needs a static incrementer - otherwise, it assumes every test class is a reset, which it no longer is (it is now static), updated bbPress unit tests where explicitly set content and titles are required.

Props thebrandonallen. Fixes #2883

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/topics/functions/topic.php

    r5925 r5947  
    2222
    2323        $t = $this->factory->topic->create( array(
     24            'post_title' => 'Topic 1',
     25            'post_content' => 'Content for Topic 1',
    2426            'post_parent' => $f,
    2527            'post_date' => $post_date,
     
    4143        $topic = bbp_get_topic( $t );
    4244
     45        remove_all_filters( 'bbp_get_topic_content' );
     46
    4347        // Topic post.
    4448        $this->assertSame( 'Topic 1', bbp_get_topic_title( $t ) );
     49        $this->assertSame( 'Content for Topic 1', bbp_get_topic_content( $t ) );
    4550        $this->assertSame( 'publish', bbp_get_topic_status( $t ) );
    4651        $this->assertSame( $f, wp_get_post_parent_id( $t ) );
Note: See TracChangeset for help on using the changeset viewer.