Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/03/2015 01:19:51 AM (9 years ago)
Author:
netweb
Message:

Tests: Remove copy pasta parameters to fix topic count tests

  • Manually flush the cache, our setup/teardown needs more work here.

Props thebrandonallen. Fixes #2796

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/topics/template/counts.php

    r5717 r5719  
    3434        ) );
    3535
     36        // @todo Investigate caching issues in bbp_get_public_child_count()
     37        wp_cache_flush();
     38
    3639        bbp_update_topic_reply_count( $t );
    3740
    3841        // Output
    39         $count = bbp_get_topic_reply_count( $t, true, false );
    4042        $this->expectOutputString( $formatted_value );
    4143        bbp_topic_reply_count( $t );
    4244
    4345        // Formatted string
    44         $count = bbp_get_topic_reply_count( $t, true, false );
     46        $count = bbp_get_topic_reply_count( $t, false );
    4547        $this->assertSame( $formatted_value, $count );
    4648
    4749        // Integer
    48         $count = bbp_get_topic_reply_count( $t, true, true );
     50        $count = bbp_get_topic_reply_count( $t, true );
    4951        $this->assertSame( $int_value, $count );
    5052    }
     
    7779        ) );
    7880
     81        // @todo Investigate caching issues in bbp_get_public_child_count()
     82        wp_cache_flush();
     83
    7984        bbp_update_topic_reply_count( $t );
    8085
    8186        // Output
    82         $count = bbp_get_topic_post_count( $t, true, false );
    8387        $this->expectOutputString( $formatted_value );
    8488        bbp_topic_post_count( $t );
    8589
    8690        // Formatted string
    87         $count = bbp_get_topic_post_count( $t, true, false );
     91        $count = bbp_get_topic_post_count( $t, false );
    8892        $this->assertSame( $formatted_value, $count );
    8993
    9094        // Integer
    91         $count = bbp_get_topic_post_count( $t, true, true );
     95        $count = bbp_get_topic_post_count( $t, true );
    9296        $this->assertSame( $int_value, $count );
    9397    }
     
    124128
    125129        // Output
    126         $count = bbp_get_topic_reply_count_hidden( $t, false );
    127130        $this->expectOutputString( $formatted_value );
    128131        bbp_topic_reply_count_hidden( $t );
     
    133136
    134137        // Integer
    135         $count = bbp_get_topic_reply_count_hidden( $t, true, true );
     138        $count = bbp_get_topic_reply_count_hidden( $t, true );
    136139        $this->assertSame( $int_value, $count );
    137140    }
     
    176179
    177180        // Output
    178         $count = bbp_get_topic_voice_count( $t, true, false );
    179181        $this->expectOutputString( $formatted_value );
    180182        bbp_topic_voice_count( $t );
    181183
    182184        // Formatted string
    183         $count = bbp_get_topic_voice_count( $t, true, false );
     185        $count = bbp_get_topic_voice_count( $t, false );
    184186        $this->assertSame( $formatted_value, $count );
    185187
    186188        // Integer
    187         $count = bbp_get_topic_voice_count( $t, true, true );
     189        $count = bbp_get_topic_voice_count( $t, true );
    188190        $this->assertSame( $int_value, $count );
    189191    }
Note: See TracChangeset for help on using the changeset viewer.