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/formatting/seemsUtf8.php

    r51623 r52010  
    1111     * @dataProvider utf8_strings
    1212     */
    13     function test_returns_true_for_utf8_strings( $utf8_string ) {
     13    public function test_returns_true_for_utf8_strings( $utf8_string ) {
    1414        // From http://www.i18nguy.com/unicode-example.html
    1515        $this->assertTrue( seems_utf8( $utf8_string ) );
    1616    }
    1717
    18     function utf8_strings() {
     18    public function utf8_strings() {
    1919        $utf8_strings = file( DIR_TESTDATA . '/formatting/utf-8/utf-8.txt' );
    2020        foreach ( $utf8_strings as &$string ) {
     
    2828     * @dataProvider big5_strings
    2929     */
    30     function test_returns_false_for_non_utf8_strings( $big5_string ) {
     30    public function test_returns_false_for_non_utf8_strings( $big5_string ) {
    3131        $this->assertFalse( seems_utf8( $big5_string ) );
    3232    }
    3333
    34     function big5_strings() {
     34    public function big5_strings() {
    3535        // Get data from formatting/big5.txt.
    3636        $big5_strings = file( DIR_TESTDATA . '/formatting/big5.txt' );
Note: See TracChangeset for help on using the changeset viewer.