Skip to:
Content

bbPress.org

Ticket #2796: 2796.01.patch

File 2796.01.patch, 2.7 KB (added by cnorris23, 7 years ago)
  • tests/phpunit/testcases/topics/template/counts.php

    diff --git tests/phpunit/testcases/topics/template/counts.php tests/phpunit/testcases/topics/template/counts.php
    index 286f7f1..d3b7177 100644
    class BBP_Tests_Topics_Template_Counts extends BBP_UnitTestCase { 
    3636                bbp_update_topic_reply_count( $t );
    3737
    3838                // Output
    39                 $count = bbp_get_topic_reply_count( $t, true, false );
    4039                $this->expectOutputString( $formatted_value );
    4140                bbp_topic_reply_count( $t );
    4241
    4342                // Formatted string
    44                 $count = bbp_get_topic_reply_count( $t, true, false );
     43                $count = bbp_get_topic_reply_count( $t );
    4544                $this->assertSame( $formatted_value, $count );
    4645
    4746                // Integer
    48                 $count = bbp_get_topic_reply_count( $t, true, true );
     47                $count = bbp_get_topic_reply_count( $t, true );
    4948                $this->assertSame( $int_value, $count );
    5049        }
    5150
    class BBP_Tests_Topics_Template_Counts extends BBP_UnitTestCase { 
    7978                bbp_update_topic_reply_count( $t );
    8079
    8180                // Output
    82                 $count = bbp_get_topic_post_count( $t, true, false );
    8381                $this->expectOutputString( $formatted_value );
    8482                bbp_topic_post_count( $t );
    8583
    8684                // Formatted string
    87                 $count = bbp_get_topic_post_count( $t, true, false );
     85                $count = bbp_get_topic_post_count( $t );
    8886                $this->assertSame( $formatted_value, $count );
    8987
    9088                // Integer
    91                 $count = bbp_get_topic_post_count( $t, true, true );
     89                $count = bbp_get_topic_post_count( $t, true );
    9290                $this->assertSame( $int_value, $count );
    9391        }
    9492
    class BBP_Tests_Topics_Template_Counts extends BBP_UnitTestCase { 
    123121                bbp_spam_reply( $r[7] );
    124122
    125123                // Output
    126                 $count = bbp_get_topic_reply_count_hidden( $t, false );
    127124                $this->expectOutputString( $formatted_value );
    128125                bbp_topic_reply_count_hidden( $t );
    129126
    130127                // Formatted string
    131                 $count = bbp_get_topic_reply_count_hidden( $t, false );
     128                $count = bbp_get_topic_reply_count_hidden( $t );
    132129                $this->assertSame( $formatted_value, $count );
    133130
    134131                // Integer
    135                 $count = bbp_get_topic_reply_count_hidden( $t, true, true );
     132                $count = bbp_get_topic_reply_count_hidden( $t, true );
    136133                $this->assertSame( $int_value, $count );
    137134        }
    138135
    class BBP_Tests_Topics_Template_Counts extends BBP_UnitTestCase { 
    175172                bbp_update_topic_voice_count( $t );
    176173
    177174                // Output
    178                 $count = bbp_get_topic_voice_count( $t, true, false );
    179175                $this->expectOutputString( $formatted_value );
    180176                bbp_topic_voice_count( $t );
    181177
    182178                // Formatted string
    183                 $count = bbp_get_topic_voice_count( $t, true, false );
     179                $count = bbp_get_topic_voice_count( $t );
    184180                $this->assertSame( $formatted_value, $count );
    185181
    186182                // Integer
    187                 $count = bbp_get_topic_voice_count( $t, true, true );
     183                $count = bbp_get_topic_voice_count( $t, true );
    188184                $this->assertSame( $int_value, $count );
    189185        }
    190186}