mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-16 02:24:30 +00:00
Coding Standards: Add visibility to methods in tests/phpunit/tests/.
Adds a `public` visibility to test fixtures, tests, data providers, and callbacks methods. This continues the previous efforts to make sure visibility is declared on all methods. Note: This will be enforced by WPCS 3.0.0. Follow-up to [51919], [52009], [52010]. Props jrf. See #56791. git-svn-id: https://develop.svn.wordpress.org/trunk@54889 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -14,7 +14,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
*/
|
||||
protected $table;
|
||||
|
||||
function set_up() {
|
||||
public function set_up() {
|
||||
parent::set_up();
|
||||
$this->table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => 'edit-page' ) );
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
* @covers WP_Posts_List_Table::display_rows
|
||||
* @covers WP_Posts_List_Table::set_hierarchical_display
|
||||
*/
|
||||
function test_list_hierarchical_pages_first_page() {
|
||||
public function test_list_hierarchical_pages_first_page() {
|
||||
$this->_test_list_hierarchical_page(
|
||||
array(
|
||||
'paged' => 1,
|
||||
@@ -98,7 +98,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
* @covers WP_Posts_List_Table::display_rows
|
||||
* @covers WP_Posts_List_Table::set_hierarchical_display
|
||||
*/
|
||||
function test_list_hierarchical_pages_second_page() {
|
||||
public function test_list_hierarchical_pages_second_page() {
|
||||
$this->_test_list_hierarchical_page(
|
||||
array(
|
||||
'paged' => 2,
|
||||
@@ -118,7 +118,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
* @covers WP_Posts_List_Table::display_rows
|
||||
* @covers WP_Posts_List_Table::set_hierarchical_display
|
||||
*/
|
||||
function test_search_hierarchical_pages_first_page() {
|
||||
public function test_search_hierarchical_pages_first_page() {
|
||||
$this->_test_list_hierarchical_page(
|
||||
array(
|
||||
'paged' => 1,
|
||||
@@ -138,7 +138,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
* @covers WP_Posts_List_Table::display_rows
|
||||
* @covers WP_Posts_List_Table::set_hierarchical_display
|
||||
*/
|
||||
function test_search_hierarchical_pages_second_page() {
|
||||
public function test_search_hierarchical_pages_second_page() {
|
||||
$this->_test_list_hierarchical_page(
|
||||
array(
|
||||
'paged' => 2,
|
||||
@@ -158,7 +158,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
* @covers WP_Posts_List_Table::display_rows
|
||||
* @covers WP_Posts_List_Table::set_hierarchical_display
|
||||
*/
|
||||
function test_grandchildren_hierarchical_pages_first_page() {
|
||||
public function test_grandchildren_hierarchical_pages_first_page() {
|
||||
// Page 6 is the first page with grandchildren.
|
||||
$this->_test_list_hierarchical_page(
|
||||
array(
|
||||
@@ -180,7 +180,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
* @covers WP_Posts_List_Table::display_rows
|
||||
* @covers WP_Posts_List_Table::set_hierarchical_display
|
||||
*/
|
||||
function test_grandchildren_hierarchical_pages_second_page() {
|
||||
public function test_grandchildren_hierarchical_pages_second_page() {
|
||||
// Page 7 is the second page with grandchildren.
|
||||
$this->_test_list_hierarchical_page(
|
||||
array(
|
||||
@@ -260,7 +260,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
*
|
||||
* @covers WP_Posts_List_Table::extra_tablenav
|
||||
*/
|
||||
function test_filter_button_should_not_be_shown_if_there_are_no_posts() {
|
||||
public function test_filter_button_should_not_be_shown_if_there_are_no_posts() {
|
||||
// Set post type to a non-existent one.
|
||||
$this->table->screen->post_type = 'foo';
|
||||
|
||||
@@ -276,7 +276,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
*
|
||||
* @covers WP_Posts_List_Table::extra_tablenav
|
||||
*/
|
||||
function test_months_dropdown_should_not_be_shown_if_there_are_no_posts() {
|
||||
public function test_months_dropdown_should_not_be_shown_if_there_are_no_posts() {
|
||||
// Set post type to a non-existent one.
|
||||
$this->table->screen->post_type = 'foo';
|
||||
|
||||
@@ -292,7 +292,7 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
|
||||
*
|
||||
* @covers WP_Posts_List_Table::extra_tablenav
|
||||
*/
|
||||
function test_category_dropdown_should_not_be_shown_if_there_are_no_posts() {
|
||||
public function test_category_dropdown_should_not_be_shown_if_there_are_no_posts() {
|
||||
// Set post type to a non-existent one.
|
||||
$this->table->screen->post_type = 'foo';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user