Skip to content

Commit cf7809e

Browse files
Refactor data provider methods and annotations
1 parent abaf4d3 commit cf7809e

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

tests/phpunit/tests/general/feedLinksExtra.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
/**
33
* Test feed_links_extra().
44
*
5-
* @ticket 54713
6-
*
75
* @group general
86
* @group template
97
*
@@ -164,12 +162,13 @@ public function set_up() {
164162
}
165163

166164
/**
167-
* @dataProvider data_feed_links_extra
168165
* @ticket 54713
169166
*
170-
* @param string $title The expected title.
171-
* @param string $type The name of the test class property containing the object ID.
172-
* @param array $args {
167+
* @dataProvider data_feed_links_extra
168+
*
169+
* @param string $title The expected title.
170+
* @param string $type The name of the test class property containing the object ID.
171+
* @param array $args {
173172
* Optional arguments. Default empty.
174173
*
175174
* @type string $separator The separator between site name and feed type.
@@ -210,7 +209,7 @@ public function test_feed_links_extra( $title, $type, array $args = array() ) {
210209
*
211210
* @return array
212211
*/
213-
public function data_feed_links_extra() {
212+
public static function data_feed_links_extra() {
214213
return array(
215214
'a post with a comment' => array(
216215
'title' => 'Test Blog » Post with a comment Comments Feed',
@@ -400,8 +399,6 @@ public function data_feed_links_extra() {
400399
/**
401400
* Helper function to get the permalink based on type.
402401
*
403-
* @ticket 54713
404-
*
405402
* @param string $type The name of the test class property containing the object ID.
406403
* @return string The permalink.
407404
*/
@@ -522,10 +519,10 @@ public function test_feed_links_extra_should_output_nothing_when_show_comments_f
522519
}
523520

524521
/**
525-
* @dataProvider data_feed_links_extra_should_output_nothing_when_post_comments_feed_link_is_falsy
526-
*
527522
* @ticket 54703
528523
*
524+
* @dataProvider data_feed_links_extra_should_output_nothing_when_post_comments_feed_link_is_falsy
525+
*
529526
* @param string $callback The callback to use for the 'post_comments_feed_link' filter.
530527
*/
531528
public function test_feed_links_extra_should_output_nothing_when_post_comments_feed_link_is_falsy( $callback ) {
@@ -540,7 +537,7 @@ public function test_feed_links_extra_should_output_nothing_when_post_comments_f
540537
*
541538
* @return array
542539
*/
543-
public function data_feed_links_extra_should_output_nothing_when_post_comments_feed_link_is_falsy() {
540+
public static function data_feed_links_extra_should_output_nothing_when_post_comments_feed_link_is_falsy() {
544541
return array(
545542
'empty string' => array( 'callback' => '__return_empty_string' ),
546543
'empty array' => array( 'callback' => '__return_empty_array' ),
@@ -581,10 +578,10 @@ public function test_feed_links_extra_should_output_the_comments_feed_link_when_
581578
}
582579

583580
/**
584-
* @dataProvider data_feed_links_extra_should_output_nothing_when_filters_return_false
585-
*
586581
* @ticket 55904
587582
*
583+
* @dataProvider data_feed_links_extra_should_output_nothing_when_filters_return_false
584+
*
588585
* @param string $type The name of the test class property containing the object ID.
589586
* @param string $filter The name of the filter to set to false.
590587
*/
@@ -602,7 +599,7 @@ public function test_feed_links_extra_should_output_nothing_when_filters_return_
602599
*
603600
* @return array
604601
*/
605-
public function data_feed_links_extra_should_output_nothing_when_filters_return_false() {
602+
public static function data_feed_links_extra_should_output_nothing_when_filters_return_false() {
606603
return array(
607604
'a post with a comment' => array(
608605
'type' => 'post_with_comment',

0 commit comments

Comments
 (0)