Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (3 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/dbdelta.php

    r51568 r52010  
    406406     * @ticket 31869
    407407     */
    408     function test_truncated_index() {
     408    public function test_truncated_index() {
    409409        global $wpdb;
    410410
     
    446446     * @ticket 36748
    447447     */
    448     function test_dont_downsize_text_fields() {
     448    public function test_dont_downsize_text_fields() {
    449449        global $wpdb;
    450450
     
    471471     * @ticket 36748
    472472     */
    473     function test_dont_downsize_blob_fields() {
     473    public function test_dont_downsize_blob_fields() {
    474474        global $wpdb;
    475475
     
    496496     * @ticket 36748
    497497     */
    498     function test_upsize_text_fields() {
     498    public function test_upsize_text_fields() {
    499499        global $wpdb;
    500500
     
    527527     * @ticket 36748
    528528     */
    529     function test_upsize_blob_fields() {
     529    public function test_upsize_blob_fields() {
    530530        global $wpdb;
    531531
     
    558558     * @ticket 20263
    559559     */
    560     function test_query_with_backticks_does_not_throw_an_undefined_index_warning() {
     560    public function test_query_with_backticks_does_not_throw_an_undefined_index_warning() {
    561561        global $wpdb;
    562562
     
    583583     * @ticket 36948
    584584     */
    585     function test_spatial_indices() {
     585    public function test_spatial_indices() {
    586586        global $wpdb;
    587587
     
    644644     * @ticket 20263
    645645     */
    646     function test_query_with_backticks_does_not_cause_a_query_to_alter_all_columns_and_indices_to_run_even_if_none_have_changed() {
     646    public function test_query_with_backticks_does_not_cause_a_query_to_alter_all_columns_and_indices_to_run_even_if_none_have_changed() {
    647647        global $wpdb;
    648648
     
    673673     * @ticket 20263
    674674     */
    675     function test_index_with_a_reserved_keyword_can_be_created() {
     675    public function test_index_with_a_reserved_keyword_can_be_created() {
    676676        global $wpdb;
    677677
     
    709709     * @ticket 20263
    710710     */
    711     function test_wp_get_db_schema_does_no_alter_queries_on_existing_install() {
     711    public function test_wp_get_db_schema_does_no_alter_queries_on_existing_install() {
    712712        $updates = dbDelta( wp_get_db_schema() );
    713713
     
    718718     * @ticket 20263
    719719     */
    720     function test_key_and_index_and_fulltext_key_and_fulltext_index_and_unique_key_and_unique_index_indicies() {
     720    public function test_key_and_index_and_fulltext_key_and_fulltext_index_and_unique_key_and_unique_index_indicies() {
    721721        global $wpdb;
    722722
     
    756756     * @ticket 20263
    757757     */
    758     function test_index_and_key_are_synonyms_and_do_not_recreate_indices() {
     758    public function test_index_and_key_are_synonyms_and_do_not_recreate_indices() {
    759759        global $wpdb;
    760760
     
    780780     * @ticket 20263
    781781     */
    782     function test_indices_with_prefix_limits_are_created_and_do_not_recreate_indices() {
     782    public function test_indices_with_prefix_limits_are_created_and_do_not_recreate_indices() {
    783783        global $wpdb;
    784784
     
    814814     * @ticket 34959
    815815     */
    816     function test_index_col_names_with_order_do_not_recreate_indices() {
     816    public function test_index_col_names_with_order_do_not_recreate_indices() {
    817817        global $wpdb;
    818818
     
    838838     * @ticket 34873
    839839     */
    840     function test_primary_key_with_single_space_does_not_recreate_index() {
     840    public function test_primary_key_with_single_space_does_not_recreate_index() {
    841841        global $wpdb;
    842842
     
    862862     * @ticket 34869
    863863     */
    864     function test_index_definitions_with_spaces_do_not_recreate_indices() {
     864    public function test_index_definitions_with_spaces_do_not_recreate_indices() {
    865865        global $wpdb;
    866866
     
    886886     * @ticket 34871
    887887     */
    888     function test_index_types_are_not_case_sensitive_and_do_not_recreate_indices() {
     888    public function test_index_types_are_not_case_sensitive_and_do_not_recreate_indices() {
    889889        global $wpdb;
    890890
     
    910910     * @ticket 34874
    911911     */
    912     function test_key_names_are_not_case_sensitive_and_do_not_recreate_indices() {
     912    public function test_key_names_are_not_case_sensitive_and_do_not_recreate_indices() {
    913913        global $wpdb;
    914914
     
    935935     * @ticket 34870
    936936     */
    937     function test_unchanged_key_lengths_do_not_recreate_index() {
     937    public function test_unchanged_key_lengths_do_not_recreate_index() {
    938938        global $wpdb;
    939939
     
    960960     * @ticket 34870
    961961     */
    962     function test_changed_key_lengths_do_not_recreate_index() {
     962    public function test_changed_key_lengths_do_not_recreate_index() {
    963963        global $wpdb;
    964964
     
    10441044     * @ticket 31679
    10451045     */
    1046     function test_column_type_change_with_hyphens_in_name() {
     1046    public function test_column_type_change_with_hyphens_in_name() {
    10471047        global $wpdb;
    10481048
Note: See TracChangeset for help on using the changeset viewer.