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/feed/atom.php

    r51651 r52010  
    6767     * This is a bit of a hack used to buffer feed content.
    6868     */
    69     function do_atom() {
     69    private function do_atom() {
    7070        ob_start();
    7171        // Nasty hack! In the future it would better to leverage do_feed( 'atom' ).
     
    8686     * with the expected child elements and attributes.
    8787     */
    88     function test_feed_element() {
     88    public function test_feed_element() {
    8989        $this->go_to( '/?feed=atom' );
    9090        $feed = $this->do_atom();
     
    130130     * Validate <entry> child elements.
    131131     */
    132     function test_entry_elements() {
     132    public function test_entry_elements() {
    133133        $this->go_to( '/?feed=atom' );
    134134        $feed = $this->do_atom();
     
    210210     * @ticket 33591
    211211     */
    212     function test_atom_enclosure_with_extended_url_length_type_parsing() {
     212    public function test_atom_enclosure_with_extended_url_length_type_parsing() {
    213213        $enclosures = array(
    214214            array(
Note: See TracChangeset for help on using the changeset viewer.