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/ajax/CustomizeManager.php

    r51568 r52010  
    9595     * @return array All caps.
    9696     */
    97     function filter_user_has_cap( $allcaps ) {
     97    public function filter_user_has_cap( $allcaps ) {
    9898        $allcaps = array_merge( $allcaps, $this->overridden_caps );
    9999        return $allcaps;
     
    106106     * @covers WP_Customize_Manager::save
    107107     */
    108     function test_save_failures() {
     108    public function test_save_failures() {
    109109        global $wp_customize;
    110110        $wp_customize = new WP_Customize_Manager();
     
    273273     * @covers WP_Customize_Manager::save
    274274     */
    275     function test_save_success_publish_create() {
     275    public function test_save_success_publish_create() {
    276276        $wp_customize = $this->set_up_valid_state();
    277277
     
    302302     * @covers WP_Customize_Manager::save
    303303     */
    304     function test_save_success_publish_edit() {
     304    public function test_save_success_publish_edit() {
    305305        $uuid = wp_generate_uuid4();
    306306
     
    341341     * @covers WP_Customize_Manager::save
    342342     */
    343     function test_success_save_post_date() {
     343    public function test_success_save_post_date() {
    344344        $uuid         = wp_generate_uuid4();
    345345        $post_id      = $this->factory()->post->create(
Note: See TracChangeset for help on using the changeset viewer.