Make WordPress Core


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

    r35242 r42343  
    1111        function setUp() {
    1212                parent::setUp();
    13                 update_option('use_balanceTags', 1);
     13                update_option( 'use_balanceTags', 1 );
    1414                kses_init_filters();
    1515
    … …  
    3232EOF;
    3333
    34                 $id = self::factory()->post->create( array( 'post_content' => $content ) );
    35                 $post = get_post($id);
     34                $id   = self::factory()->post->create( array( 'post_content' => $content ) );
     35                $post = get_post( $id );
    3636
    3737                $this->assertEquals( $expected, $post->post_content );
    … …  
    4949EOF;
    5050
    51                 $id = self::factory()->post->create( array( 'post_content' => $content ) );
    52                 $post = get_post($id);
     51                $id   = self::factory()->post->create( array( 'post_content' => $content ) );
     52                $post = get_post( $id );
    5353
    5454                $this->assertEquals( $expected, $post->post_content );
    … …  
    6666EOF;
    6767
    68                 $id = self::factory()->post->create( array( 'post_content' => $content ) );
    69                 $post = get_post($id);
     68                $id   = self::factory()->post->create( array( 'post_content' => $content ) );
     69                $post = get_post( $id );
    7070
    7171                $this->assertEquals( $expected, $post->post_content );
    … …  
    7474        /**
    7575         * test kses bug. xhtml does not require space before closing empty element
     76         *
    7677         * @ticket 12394
    7778         */
    … …  
    8586EOF;
    8687
    87                 $id = self::factory()->post->create( array( 'post_content' => $content ) );
    88                 $post = get_post($id);
     88                $id   = self::factory()->post->create( array( 'post_content' => $content ) );
     89                $post = get_post( $id );
    8990
    9091                $this->assertEquals( $expected, $post->post_content );
    … …  
    9495        function test_post_content_nobalance_nextpage_more() {
    9596
    96                 update_option('use_balanceTags', 0);
     97                update_option( 'use_balanceTags', 0 );
    9798
    9899                $content = <<<EOF
    … …  
    105106EOF;
    106107
    107                 $id = self::factory()->post->create( array( 'post_content' => $content ) );
    108                 $post = get_post($id);
     108                $id   = self::factory()->post->create( array( 'post_content' => $content ) );
     109                $post = get_post( $id );
    109110
    110111                $this->assertEquals( $content, $post->post_content );
Note: See TracChangeset for help on using the changeset viewer.