Changeset 52010 for trunk/tests/phpunit/tests/comment/template.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/template.php
r49863 r52010 20 20 } 21 21 22 function test_get_comments_number() {22 public function test_get_comments_number() { 23 23 $post_id = self::$post_id; 24 24 … … 33 33 } 34 34 35 function test_get_comments_number_without_arg() {35 public function test_get_comments_number_without_arg() { 36 36 $post_id = self::$post_id; 37 37 $permalink = get_permalink( $post_id ); … … 49 49 * @ticket 48772 50 50 */ 51 function test_get_comments_number_text_with_post_id() {51 public function test_get_comments_number_text_with_post_id() { 52 52 $post_id = self::$post_id; 53 53 $this->factory->comment->create_post_comments( $post_id, 6 ); … … 68 68 * @ticket 13651 69 69 */ 70 function test_get_comments_number_text_declension_with_default_args() {70 public function test_get_comments_number_text_declension_with_default_args() { 71 71 $post_id = self::$post_id; 72 72 $permalink = get_permalink( $post_id ); … … 91 91 * @dataProvider data_get_comments_number_text_declension 92 92 */ 93 function test_get_comments_number_text_declension_with_custom_args( $number, $input, $output ) {93 public function test_get_comments_number_text_declension_with_custom_args( $number, $input, $output ) { 94 94 $post_id = self::$post_id; 95 95 $permalink = get_permalink( $post_id ); … … 98 98 $this->go_to( $permalink ); 99 99 100 add_filter( 'gettext_with_context', array( $this, ' _enable_comment_number_declension' ), 10, 4 );100 add_filter( 'gettext_with_context', array( $this, 'enable_comment_number_declension' ), 10, 4 ); 101 101 102 102 $this->assertSame( $output, get_comments_number_text( false, false, $input ) ); 103 103 104 remove_filter( 'gettext_with_context', array( $this, ' _enable_comment_number_declension' ), 10, 4 );104 remove_filter( 'gettext_with_context', array( $this, 'enable_comment_number_declension' ), 10, 4 ); 105 105 } 106 106 107 function _enable_comment_number_declension( $translation, $text, $context, $domain ) {107 public function enable_comment_number_declension( $translation, $text, $context, $domain ) { 108 108 if ( 'Comment number declension: on or off' === $context ) { 109 109 $translation = 'on'; … … 124 124 * } 125 125 */ 126 function data_get_comments_number_text_declension() {126 public function data_get_comments_number_text_declension() { 127 127 return array( 128 128 array(
Note: See TracChangeset
for help on using the changeset viewer.