Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/12/2016 06:23:47 AM (9 years ago)
Author:
netweb
Message:

Tests: Update forum/topic/reply post type assertions for the WP_Post_Type class introduced in WordPress 4.6

Fixes #2962.

File:
1 edited

Legend:

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

    r5890 r6071  
    2525
    2626        $robj = get_post_type_object( 'reply' );
    27         $this->assertInstanceOf( 'stdClass', $robj );
     27
     28        // WordPress 4.6 introduced `WP_Post_Type` class
     29        if ( bbp_get_major_wp_version() < 4.6 ) {
     30            $this->assertInstanceOf( 'stdClass', $robj );
     31        } else {
     32            $this->assertInstanceOf( 'WP_Post_Type', $robj );
     33        }
     34
    2835        $this->assertEquals( 'reply', $robj->name );
    2936
Note: See TracChangeset for help on using the changeset viewer.