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/term/wpInsertTerm.php

    r46586 r47122  
    99
    1010        _clean_term_filters();
    11         // insert one term into every post taxonomy
    12         // otherwise term_ids and term_taxonomy_ids might be identical, which could mask bugs
     11        // Insert one term into every post taxonomy.
     12        // Otherwise term_ids and term_taxonomy_ids might be identical, which could mask bugs.
    1313        $term = 'seed_term';
    1414        foreach ( get_object_taxonomies( 'post' ) as $tax ) {
     
    2121        register_taxonomy( $taxonomy, 'post' );
    2222
    23         // a new unused term
     23        // A new unused term.
    2424        $term = 'term';
    2525        $this->assertNull( term_exists( $term ) );
     
    3434        $this->assertEquals( $initial_count + 1, wp_count_terms( $taxonomy ) );
    3535
    36         // make sure the term exists
     36        // Make sure the term exists.
    3737        $this->assertTrue( term_exists( $term ) > 0 );
    3838        $this->assertTrue( term_exists( $t['term_id'] ) > 0 );
    3939
    40         // now delete it
     40        // Now delete it.
    4141        add_filter( 'delete_term', array( $this, 'deleted_term_cb' ), 10, 5 );
    4242        $this->assertTrue( wp_delete_term( $t['term_id'], $taxonomy ) );
     
    190190        $this->assertTrue( empty( $term->errors ) );
    191191
    192         // Test existing term name with unique slug
     192        // Test existing term name with unique slug.
    193193        $term1 = self::factory()->tag->create(
    194194            array(
     
    199199        $this->assertNotWPError( $term1 );
    200200
    201         // Test an existing term name
     201        // Test an existing term name.
    202202        $term2 = self::factory()->tag->create( array( 'name' => 'Bozo' ) );
    203203        $this->assertWPError( $term2 );
    204204        $this->assertNotEmpty( $term2->errors );
    205205
    206         // Test named terms ending in special characters
     206        // Test named terms ending in special characters.
    207207        $term3 = self::factory()->tag->create( array( 'name' => 'T$' ) );
    208208        $term4 = self::factory()->tag->create( array( 'name' => 'T$$' ) );
     
    217217        $this->assertCount( 4, array_unique( wp_list_pluck( $terms, 'slug' ) ) );
    218218
    219         // Test named terms with only special characters
     219        // Test named terms with only special characters.
    220220        $term8  = self::factory()->tag->create( array( 'name' => '$' ) );
    221221        $term9  = self::factory()->tag->create( array( 'name' => '$$' ) );
Note: See TracChangeset for help on using the changeset viewer.