Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/27/2015 01:07:53 PM (11 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/forums/template/forum.php

    r5880 r5947  
    4242                }
    4343
    44                 $f = $this->factory->forum->create();
     44                $f = $this->factory->forum->create( array(
     45                        'post_title' => 'Forum 1',
     46                ) );
    4547
    4648                $forum_permalink = bbp_get_forum_permalink( $f );
     
    5759         */
    5860        public function test_bbp_get_forum_title() {
    59                 $f = $this->factory->forum->create();
     61                $f = $this->factory->forum->create( array(
     62                        'post_title' => 'Forum 1',
     63                ) );
    6064
    6165                $forum = bbp_get_forum_title( $f );
     
    8185         */
    8286        public function test_bbp_get_forum_content() {
    83                 $f = $this->factory->forum->create();
     87                $f = $this->factory->forum->create( array(
     88                        'post_content' => 'Content of Forum 1',
     89                ) );
    8490
    8591                $forum = bbp_get_forum_content( $f );
     
    106112
    107113                $t = $this->factory->topic->create( array(
     114                        'post_title' => 'Topic 1',
    108115                        'post_parent' => $f,
    109116                        'post_date' => $post_date,
     
    139146
    140147                $t1 = $this->factory->topic->create( array(
     148                        'post_title' => 'Topic 1',
    141149                        'post_parent' => $f,
    142150                        'post_date' => $post_date_t1,
     
    150158
    151159                $t2 = $this->factory->topic->create( array(
     160                        'post_title' => 'Topic 2',
    152161                        'post_parent' => $f,
    153162                        'post_date' => $post_date_t2,
     
    166175
    167176                $t3 = $this->factory->topic->create( array(
     177                        'post_title' => 'Topic 3',
    168178                        'post_parent' => $f,
    169179                        'post_date' => $post_date_t3,
     
    183193
    184194                $t4 = $this->factory->topic->create( array(
     195                        'post_title' => 'Topic 4',
    185196                        'post_parent' => $f,
    186197                        'post_date' => $post_date_t4,
     
    215226
    216227                $t5 = $this->factory->topic->create( array(
     228                        'post_title' => 'Topic 5',
    217229                        'post_parent' => $f,
    218230                        'post_date' => $post_date_t5,
Note: See TracChangeset for help on using the changeset viewer.