WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (10 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

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

    r46586 r47122  
    5050     */
    5151    function test_convert_standard_smilies( $in_txt, $converted_txt ) {
    52         // standard smilies, use_smilies: ON
    53         update_option( 'use_smilies', 1 );
    54 
    55         smilies_init();
    56 
    57         $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) );
    58 
    59         // standard smilies, use_smilies: OFF
     52        // Standard smilies, use_smilies: ON.
     53        update_option( 'use_smilies', 1 );
     54
     55        smilies_init();
     56
     57        $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) );
     58
     59        // Standard smilies, use_smilies: OFF.
    6060        update_option( 'use_smilies', 0 );
    6161
     
    9595        global $wpsmiliestrans;
    9696
    97         // custom smilies, use_smilies: ON
     97        // Custom smilies, use_smilies: ON.
    9898        update_option( 'use_smilies', 1 );
    9999
     
    102102        }
    103103
    104         $trans_orig = $wpsmiliestrans; // save original translations array
     104        $trans_orig = $wpsmiliestrans; // Save original translations array.
    105105
    106106        $wpsmiliestrans = array(
     
    115115        $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) );
    116116
    117         // standard smilies, use_smilies: OFF
     117        // Standard smilies, use_smilies: OFF.
    118118        update_option( 'use_smilies', 0 );
    119119
    120120        $this->assertEquals( $in_txt, convert_smilies( $in_txt ) );
    121121
    122         $wpsmiliestrans = $trans_orig; // reset original translations array
     122        $wpsmiliestrans = $trans_orig; // Reset original translations array.
    123123    }
    124124
     
    150150        $exp_str = "Do we ingore smilies \xf0\x9f\x98\x89 in $element tags <$element class=\"foo\">My Content Here :?: </$element>";
    151151
    152         // standard smilies, use_smilies: ON
     152        // Standard smilies, use_smilies: ON.
    153153        update_option( 'use_smilies', 1 );
    154154        smilies_init();
     
    156156        $this->assertEquals( $exp_str, convert_smilies( $in_str ) );
    157157
    158         // standard smilies, use_smilies: OFF
     158        // Standard smilies, use_smilies: OFF.
    159159        update_option( 'use_smilies', 0 );
    160160    }
     
    202202     */
    203203    public function test_smilies_combinations( $in_txt, $converted_txt ) {
    204         // custom smilies, use_smilies: ON
    205         update_option( 'use_smilies', 1 );
    206         smilies_init();
    207 
    208         $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) );
    209 
    210         // custom smilies, use_smilies: OFF
     204        // Custom smilies, use_smilies: ON.
     205        update_option( 'use_smilies', 1 );
     206        smilies_init();
     207
     208        $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) );
     209
     210        // Custom smilies, use_smilies: OFF.
    211211        update_option( 'use_smilies', 0 );
    212212
     
    246246        global $wpsmiliestrans;
    247247
    248         // standard smilies, use_smilies: ON
     248        // Standard smilies, use_smilies: ON.
    249249        update_option( 'use_smilies', 1 );
    250250
     
    253253        }
    254254
    255         $orig_trans = $wpsmiliestrans; // save original tranlations array
     255        $orig_trans = $wpsmiliestrans; // Save original tranlations array.
    256256
    257257        $wpsmiliestrans = array(
     
    263263        $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) );
    264264
    265         // standard smilies, use_smilies: OFF
     265        // Standard smilies, use_smilies: OFF.
    266266        update_option( 'use_smilies', 0 );
    267267
    268268        $this->assertEquals( $in_txt, convert_smilies( $in_txt ) );
    269269
    270         $wpsmiliestrans = $orig_trans; // reset original translations array
     270        $wpsmiliestrans = $orig_trans; // Reset original translations array.
    271271    }
    272272
     
    301301     */
    302302    function test_spaces_around_smilies( $in_txt, $converted_txt ) {
    303         // standard smilies, use_smilies: ON
    304         update_option( 'use_smilies', 1 );
    305 
    306         smilies_init();
    307 
    308         $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) );
    309 
    310         // standard smilies, use_smilies: OFF
     303        // Standard smilies, use_smilies: ON.
     304        update_option( 'use_smilies', 1 );
     305
     306        smilies_init();
     307
     308        $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) );
     309
     310        // Standard smilies, use_smilies: OFF.
    311311        update_option( 'use_smilies', 0 );
    312312    }
Note: See TracChangeset for help on using the changeset viewer.