Make WordPress Core


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

    r46586 r47122  
    2727
    2828        global $wpdb;
    29         // crude but effective: make sure there's no residual data in the main tables
     29        // Crude but effective: make sure there's no residual data in the main tables.
    3030        foreach ( array( 'posts', 'postmeta', 'comments', 'terms', 'term_taxonomy', 'term_relationships', 'users', 'usermeta' ) as $table ) {
    3131            // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     
    5050        $this->_import_wp( DIR_TESTDATA . '/export/small-export.xml', $authors );
    5151
    52         // ensure that authors were imported correctly
     52        // Ensure that authors were imported correctly.
    5353        $user_count = count_users();
    5454        $this->assertEquals( 3, $user_count['total_users'] );
     
    6565        $this->assertEquals( 'author@example.org', $author->user_email );
    6666
    67         // check that terms were imported correctly
     67        // Check that terms were imported correctly.
    6868        $this->assertEquals( 30, wp_count_terms( 'category' ) );
    6969        $this->assertEquals( 3, wp_count_terms( 'post_tag' ) );
     
    7474        $this->assertEquals( $bar->term_id, $foo_bar->parent );
    7575
    76         // check that posts/pages were imported correctly
     76        // Check that posts/pages were imported correctly.
    7777        $post_count = wp_count_posts( 'post' );
    7878        $this->assertEquals( 5, $post_count->publish );
     
    251251    function test_ordering_of_importers() {
    252252        global $wp_importers;
    253         $_wp_importers = $wp_importers; // Preserve global state
     253        $_wp_importers = $wp_importers; // Preserve global state.
    254254        $wp_importers  = array(
    255255            'xyz1' => array( 'xyz1' ),
     
    269269            get_importers()
    270270        );
    271         $wp_importers = $_wp_importers; // Restore global state
     271        $wp_importers = $_wp_importers; // Restore global state.
    272272    }
    273273
     
    295295        $this->assertSame( 'Slashes aren\\\'t \"cool\"', $posts[0]->post_content );
    296296    }
    297 
    298     // function test_menu_import
    299297}
Note: See TracChangeset for help on using the changeset viewer.