Make WordPress Core


Ignore:
Timestamp:
11/29/2022 12:32:37 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/wpPostsListTable.php

    r54663 r54889  
    1515        protected $table;
    1616
    17         function set_up() {
     17        public function set_up() {
    1818                parent::set_up();
    1919                $this->table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => 'edit-page' ) );
    … …  
    8080         * @covers WP_Posts_List_Table::set_hierarchical_display
    8181         */
    82         function test_list_hierarchical_pages_first_page() {
     82        public function test_list_hierarchical_pages_first_page() {
    8383                $this->_test_list_hierarchical_page(
    8484                        array(
    … …  
    9999         * @covers WP_Posts_List_Table::set_hierarchical_display
    100100         */
    101         function test_list_hierarchical_pages_second_page() {
     101        public function test_list_hierarchical_pages_second_page() {
    102102                $this->_test_list_hierarchical_page(
    103103                        array(
    … …  
    119119         * @covers WP_Posts_List_Table::set_hierarchical_display
    120120         */
    121         function test_search_hierarchical_pages_first_page() {
     121        public function test_search_hierarchical_pages_first_page() {
    122122                $this->_test_list_hierarchical_page(
    123123                        array(
    … …  
    139139         * @covers WP_Posts_List_Table::set_hierarchical_display
    140140         */
    141         function test_search_hierarchical_pages_second_page() {
     141        public function test_search_hierarchical_pages_second_page() {
    142142                $this->_test_list_hierarchical_page(
    143143                        array(
    … …  
    159159         * @covers WP_Posts_List_Table::set_hierarchical_display
    160160         */
    161         function test_grandchildren_hierarchical_pages_first_page() {
     161        public function test_grandchildren_hierarchical_pages_first_page() {
    162162                // Page 6 is the first page with grandchildren.
    163163                $this->_test_list_hierarchical_page(
    … …  
    181181         * @covers WP_Posts_List_Table::set_hierarchical_display
    182182         */
    183         function test_grandchildren_hierarchical_pages_second_page() {
     183        public function test_grandchildren_hierarchical_pages_second_page() {
    184184                // Page 7 is the second page with grandchildren.
    185185                $this->_test_list_hierarchical_page(
    … …  
    261261         * @covers WP_Posts_List_Table::extra_tablenav
    262262         */
    263         function test_filter_button_should_not_be_shown_if_there_are_no_posts() {
     263        public function test_filter_button_should_not_be_shown_if_there_are_no_posts() {
    264264                // Set post type to a non-existent one.
    265265                $this->table->screen->post_type = 'foo';
    … …  
    277277         * @covers WP_Posts_List_Table::extra_tablenav
    278278         */
    279         function test_months_dropdown_should_not_be_shown_if_there_are_no_posts() {
     279        public function test_months_dropdown_should_not_be_shown_if_there_are_no_posts() {
    280280                // Set post type to a non-existent one.
    281281                $this->table->screen->post_type = 'foo';
    … …  
    293293         * @covers WP_Posts_List_Table::extra_tablenav
    294294         */
    295         function test_category_dropdown_should_not_be_shown_if_there_are_no_posts() {
     295        public function test_category_dropdown_should_not_be_shown_if_there_are_no_posts() {
    296296                // Set post type to a non-existent one.
    297297                $this->table->screen->post_type = 'foo';
Note: See TracChangeset for help on using the changeset viewer.