Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/24/2015 09:55:26 AM (9 years ago)
Author:
netweb
Message:

Tests: Ensure bbPress' custom post types posts are created with a unique GUID.

Props tharsheblows, netweb. Fixes #2844, see also #WP5305 / wp:changeset:33630.

File:
1 edited

Legend:

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

    r5915 r5925  
    1919
    2020        $now = time();
    21         $post_date = date( 'Y-m-d H:i:s', $now - 60*60*100 );
     21        $post_date = date( 'Y-m-d H:i:s', $now - 60 * 60 * 100 );
    2222
    2323        $t = $this->factory->topic->create( array(
     
    3838        ) );
    3939
    40         // Topic post
     40        // Get the topic.
     41        $topic = bbp_get_topic( $t );
     42
     43        // Topic post.
    4144        $this->assertSame( 'Topic 1', bbp_get_topic_title( $t ) );
    4245        $this->assertSame( 'publish', bbp_get_topic_status( $t ) );
    43         $this->assertSame( $f, wp_get_post_parent_id( $t ) ); // post parent
    44 
    45         // Topic meta
    46         $this->assertSame( $f, bbp_get_topic_forum_id( $t ) ); // _bbp_forum_id
     46        $this->assertSame( $f, wp_get_post_parent_id( $t ) );
     47        $this->assertEquals( 'http://' . WP_TESTS_DOMAIN . '/?topic=' . $topic->post_name, $topic->guid );
     48
     49        // Topic meta.
     50        $this->assertSame( $f, bbp_get_topic_forum_id( $t ) );
    4751        $this->assertSame( 1, bbp_get_topic_reply_count( $t, true ) );
    4852        $this->assertSame( 0, bbp_get_topic_reply_count_hidden( $t, true ) );
Note: See TracChangeset for help on using the changeset viewer.