Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (6 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/post/pings.php

    r38852 r42343  
    88
    99    public function test_returns_to_ping_sites_from_post_id() {
    10         $post_id = self::factory()->post->create( array( 'to_ping' => 'http://www.example.com
    11                     http://www.otherexample.com' ) );
     10        $post_id = self::factory()->post->create(
     11            array(
     12                'to_ping' => 'http://www.example.com
     13                    http://www.otherexample.com',
     14            )
     15        );
    1216        $this->assertSame( array( 'http://www.example.com', 'http://www.otherexample.com' ), get_to_ping( $post_id ) );
    1317    }
    1418
    1519    public function test_returns_to_ping_sites_from_post_object() {
    16         $post_id = self::factory()->post->create( array( 'to_ping' => 'http://www.example.com
    17                     http://www.otherexample.com' ) );
    18         $post = get_post( $post_id );
     20        $post_id = self::factory()->post->create(
     21            array(
     22                'to_ping' => 'http://www.example.com
     23                    http://www.otherexample.com',
     24            )
     25        );
     26        $post    = get_post( $post_id );
    1927        $this->assertSame( array( 'http://www.example.com', 'http://www.otherexample.com' ), get_to_ping( $post ) );
    2028    }
     
    2735    public function test_returns_pinged_sites_from_post_object() {
    2836        $post_id = self::factory()->post->create( array( 'pinged' => 'foo bar baz' ) );
    29         $post = get_post( $post_id );
     37        $post    = get_post( $post_id );
    3038        $this->assertSame( array( 'foo', 'bar', 'baz' ), get_pung( $post ) );
    3139    }
     
    4755    public function test_add_ping_with_post_object() {
    4856        $post_id = self::factory()->post->create();
    49         $post = get_post( $post_id );
     57        $post    = get_post( $post_id );
    5058        add_ping( $post, 'foo' );
    5159        $this->assertSame( array( 'foo' ), get_pung( $post_id ) );
Note: See TracChangeset for help on using the changeset viewer.