Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (5 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods.

Adds a private visibility to helper methods within test classes.

Renames callbacks and helpers that previously started with a _ prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit.

Props costdev, jrf, hellofromTonya.
Fixes #54177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/date.php

    r48952 r52010  
    1212         * @ticket 20328
    1313         */
    14         function test_get_date_from_gmt_outside_of_dst() {
     14        public function test_get_date_from_gmt_outside_of_dst() {
    1515                update_option( 'timezone_string', 'Europe/London' );
    1616                $local = '2012-01-01 12:34:56';
    … …  
    2424         * @ticket 20328
    2525         */
    26         function test_get_date_from_gmt_during_dst() {
     26        public function test_get_date_from_gmt_during_dst() {
    2727                update_option( 'timezone_string', 'Europe/London' );
    2828                $gmt   = '2012-06-01 12:34:56';
    … …  
    3434         * @ticket 20328
    3535         */
    36         function test_get_gmt_from_date_outside_of_dst() {
     36        public function test_get_gmt_from_date_outside_of_dst() {
    3737                update_option( 'timezone_string', 'Europe/London' );
    3838                $local = '2012-01-01 12:34:56';
    … …  
    4444         * @ticket 20328
    4545         */
    46         function test_get_gmt_from_date_during_dst() {
     46        public function test_get_gmt_from_date_during_dst() {
    4747                update_option( 'timezone_string', 'Europe/London' );
    4848                $local = '2012-06-01 12:34:56';
    … …  
    5454         * @ticket 34279
    5555         */
    56         function test_get_date_and_time_from_gmt_no_timezone() {
     56        public function test_get_date_and_time_from_gmt_no_timezone() {
    5757                $local = '2012-01-01 12:34:56';
    5858                $gmt   = $local;
    … …  
    6363         * @ticket 34279
    6464         */
    65         function test_get_gmt_from_date_no_timezone() {
     65        public function test_get_gmt_from_date_no_timezone() {
    6666                $gmt  = '2012-12-01 00:00:00';
    6767                $date = '2012-12-01';
    … …  
    7272         * @ticket 34279
    7373         */
    74         function test_get_gmt_from_date_short_date() {
     74        public function test_get_gmt_from_date_short_date() {
    7575                update_option( 'timezone_string', 'Europe/London' );
    7676                $local = '2012-12-01';
    … …  
    8282         * @ticket 34279
    8383         */
    84         function test_get_gmt_from_date_string_date() {
     84        public function test_get_gmt_from_date_string_date() {
    8585                update_option( 'timezone_string', 'Europe/London' );
    8686                $local = 'now';
    … …  
    9292         * @ticket 34279
    9393         */
    94         function test_get_gmt_from_date_string_date_no_timezone() {
     94        public function test_get_gmt_from_date_string_date_no_timezone() {
    9595                $local = 'now';
    9696                $gmt   = gmdate( 'Y-m-d H:i:s' );
Note: See TracChangeset for help on using the changeset viewer.