Skip to:
Content

bbPress.org

Changeset 5766


Ignore:
Timestamp:
05/13/2015 10:17:02 AM (10 years ago)
Author:
netweb
Message:

Tests: Improved performance and use bbp_clean_post_cache() in topics template counts function tests

Props thebrandonallen. See #2081

File:
1 edited

Legend:

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

    r5719 r5766  
    2323        ) );
    2424
    25         $int_value = 9;
     25        $int_value = 3;
    2626        $formatted_value = bbp_number_format( $int_value );
    2727
     
    3434        ) );
    3535
    36         // @todo Investigate caching issues in bbp_get_public_child_count()
    37         wp_cache_flush();
    38 
     36        bbp_clean_post_cache( $t );
    3937        bbp_update_topic_reply_count( $t );
    4038
     
    6058
    6159        $int_topics  = 1;
    62         $int_replies = 9;
     60        $int_replies = 3;
    6361        $int_value   = $int_topics + $int_replies;
    6462        $formatted_value = bbp_number_format( $int_value );
     
    7977        ) );
    8078
    81         // @todo Investigate caching issues in bbp_get_public_child_count()
    82         wp_cache_flush();
    83 
     79        bbp_clean_post_cache( $t );
    8480        bbp_update_topic_reply_count( $t );
    8581
     
    104100        $f = $this->factory->forum->create();
    105101
    106         $int_value = 9;
     102        $int_value = 3;
    107103        $formatted_value = bbp_number_format( $int_value );
    108104
     
    125121        bbp_update_topic_reply_count_hidden( $t );
    126122
    127         bbp_spam_reply( $r[7] );
     123        bbp_spam_reply( $r[1] );
    128124
    129125        // Output
Note: See TracChangeset for help on using the changeset viewer.