WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (3 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/getTerm.php

    r42228 r42343  
    2424
    2525        // Manually modify because shared terms shouldn't naturally occur.
    26         $wpdb->update( $wpdb->term_taxonomy,
     26        $wpdb->update(
     27            $wpdb->term_taxonomy,
    2728            array( 'term_id' => $t1['term_id'] ),
    2829            array( 'term_taxonomy_id' => $t2['term_taxonomy_id'] ),
     
    3334        return array(
    3435            array(
    35                 'term_id' => $t1['term_id'],
    36                 'old_term_id' => $t1['term_id'],
     36                'term_id'          => $t1['term_id'],
     37                'old_term_id'      => $t1['term_id'],
    3738                'term_taxonomy_id' => $t1['term_taxonomy_id'],
    3839            ),
    3940            array(
    40                 'term_id' => $t1['term_id'],
    41                 'old_term_id' => $t2['term_id'],
     41                'term_id'          => $t1['term_id'],
     42                'old_term_id'      => $t2['term_id'],
    4243                'term_taxonomy_id' => $t2['term_taxonomy_id'],
    4344            ),
     
    8687
    8788        // Prime cache.
    88         $term_a = get_term( $t, 'wptests_tax' );
     89        $term_a      = get_term( $t, 'wptests_tax' );
    8990        $num_queries = $wpdb->num_queries;
    9091
     
    101102
    102103    public function test_output_array_a() {
    103         $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) );
     104        $t    = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) );
    104105        $term = get_term( $t, 'wptests_tax', ARRAY_A );
    105106        $this->assertInternalType( 'array', $term );
     
    108109
    109110    public function test_output_array_n() {
    110         $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) );
     111        $t    = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) );
    111112        $term = get_term( $t, 'wptests_tax', ARRAY_N );
    112113        $this->assertInternalType( 'array', $term );
Note: See TracChangeset for help on using the changeset viewer.