Skip to content

Commit 9c722ca

Browse files
Move data provider after tests that use it
1 parent 7e66010 commit 9c722ca

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

tests/phpunit/tests/rest-api/rest-comments-controller.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4134,20 +4134,6 @@ public function test_get_note_with_children_link() {
41344134
$this->assertStringContainsString( 'type=note', $children[0]['href'] );
41354135
}
41364136

4137-
/**
4138-
* Data provider for comment type tests.
4139-
*
4140-
* @return array[] Data provider.
4141-
*/
4142-
public function data_comment_type_provider() {
4143-
return array(
4144-
'comment type' => array( 'comment', 5 ),
4145-
'annotation type' => array( 'annotation', 5 ),
4146-
'discussion type' => array( 'discussion', 9 ),
4147-
'note type' => array( 'note', 3 ),
4148-
);
4149-
}
4150-
41514137
/**
41524138
* Test retrieving comments by type as authenticated user.
41534139
*
@@ -4247,4 +4233,18 @@ public function test_get_items_type_arg_unauthenticated( $comment_type, $count )
42474233
$this->assertSame( 'note' === $comment_type ? 401 : 200, $response->get_status(), 'Individual comment endpoint did not return the expected status' );
42484234
}
42494235
}
4236+
4237+
/**
4238+
* Data provider for comment type tests.
4239+
*
4240+
* @return array[] Data provider.
4241+
*/
4242+
public function data_comment_type_provider() {
4243+
return array(
4244+
'comment type' => array( 'comment', 5 ),
4245+
'annotation type' => array( 'annotation', 5 ),
4246+
'discussion type' => array( 'discussion', 9 ),
4247+
'note type' => array( 'note', 3 ),
4248+
);
4249+
}
42504250
}

0 commit comments

Comments
 (0)