Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (7 years 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/pomo/po.php

    r46612 r47122  
    88                parent::setUp();
    99                require_once ABSPATH . '/wp-includes/pomo/po.php';
    10                 // not so random wordpress.pot string -- multiple lines
     10                // Not so random wordpress.pot string -- multiple lines.
    1111                $this->mail    = 'Your new WordPress blog has been successfully set up at:
    1212
     
    5151        function test_poify() {
    5252                $po = new PO();
    53                 //simple
     53                // Simple.
    5454                $this->assertEquals( '"baba"', $po->poify( 'baba' ) );
    55                 //long word
     55                // Long word.
    5656                $this->assertEquals( $this->po_a90, $po->poify( $this->a90 ) );
    57                 // tab
     57                // Tab.
    5858                $this->assertEquals( '"ba\tba"', $po->poify( "ba\tba" ) );
    59                 // do not add leading empty string of one-line string ending on a newline
     59                // Do not add leading empty string of one-line string ending on a newline.
    6060                $this->assertEquals( '"\\\\a\\\\n\\n"', $po->poify( "\a\\n\n" ) );
    61                 // backslash
     61                // Backslash.
    6262                $this->assertEquals( '"ba\\\\ba"', $po->poify( 'ba\\ba' ) );
    63                 // random wordpress.pot string
     63                // Random wordpress.pot string.
    6464                $src = 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.';
    6565                $this->assertEquals( '"Categories can be selectively converted to tags using the <a href=\\"%s\\">category to tag converter</a>."', $po->poify( $src ) );
     
    7474                $this->assertEquals( $this->a90, $po->unpoify( $this->po_a90 ) );
    7575                $this->assertEquals( '\\t\\n', $po->unpoify( '"\\\\t\\\\n"' ) );
    76                 // wordwrapped
     76                // Wordwrapped.
    7777                $this->assertEquals( 'babadyado', $po->unpoify( "\"\"\n\"baba\"\n\"dyado\"" ) );
    7878                $this->assertEqualsIgnoreEOL( $this->mail, $po->unpoify( $this->po_mail ) );
     
    8383                $entry = new Translation_Entry( array( 'singular' => 'baba' ) );
    8484                $this->assertEquals( "msgid \"baba\"\nmsgstr \"\"", $po->export_entry( $entry ) );
    85                 // plural
     85                // Plural.
    8686                $entry = new Translation_Entry(
    8787                        array(
     
    182182                        $po->export_entry( $entry )
    183183                );
    184                 // context
     184                // Context.
    185185                $entry = new Translation_Entry(
    186186                        array(
     
    321321        }
    322322
    323         //TODO: add tests for bad files
     323        // TODO: Add tests for bad files.
    324324}
    325325
Note: See TracChangeset for help on using the changeset viewer.