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/includes/factory.php

    r35242 r42343  
    99    function test_create_creates_a_category() {
    1010        $id = $this->category_factory->create();
    11         $this->assertTrue( (bool)get_term_by( 'id', $id, 'category' ) );
     11        $this->assertTrue( (bool) get_term_by( 'id', $id, 'category' ) );
    1212    }
    1313
    1414    function test_get_object_by_id_gets_an_object() {
    1515        $id = $this->category_factory->create();
    16         $this->assertTrue( (bool)$this->category_factory->get_object_by_id( $id ) );
     16        $this->assertTrue( (bool) $this->category_factory->get_object_by_id( $id ) );
    1717    }
    1818
    1919    function test_get_object_by_id_gets_an_object_with_the_same_name() {
    20         $id = $this->category_factory->create( array( 'name' => 'Boo') );
     20        $id     = $this->category_factory->create( array( 'name' => 'Boo' ) );
    2121        $object = $this->category_factory->get_object_by_id( $id );
    2222        $this->assertEquals( 'Boo', $object->name );
     
    2525    function test_the_taxonomy_argument_overrules_the_factory_taxonomy() {
    2626        $term_factory = new WP_UnitTest_Factory_For_term( null, 'category' );
    27         $id = $term_factory->create( array( 'taxonomy' => 'post_tag' ) );
    28         $term = get_term( $id, 'post_tag' );
     27        $id           = $term_factory->create( array( 'taxonomy' => 'post_tag' ) );
     28        $term         = get_term( $id, 'post_tag' );
    2929        $this->assertEquals( $id, $term->term_id );
    3030    }
Note: See TracChangeset for help on using the changeset viewer.