Make WordPress Core


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

    r25002 r42343  
    66class Tests_Formatting_SanitizeTitle extends WP_UnitTestCase {
    77    function test_strips_html() {
    8         $input = "Captain <strong>Awesome</strong>";
    9         $expected = "captain-awesome";
    10         $this->assertEquals($expected, sanitize_title($input));
     8        $input    = 'Captain <strong>Awesome</strong>';
     9        $expected = 'captain-awesome';
     10        $this->assertEquals( $expected, sanitize_title( $input ) );
    1111    }
    1212
    1313    function test_titles_sanitized_to_nothing_are_replaced_with_optional_fallback() {
    14         $input = "<strong></strong>";
    15         $fallback = "Captain Awesome";
    16         $this->assertEquals($fallback, sanitize_title($input, $fallback));
     14        $input    = '<strong></strong>';
     15        $fallback = 'Captain Awesome';
     16        $this->assertEquals( $fallback, sanitize_title( $input, $fallback ) );
    1717    }
    1818}
Note: See TracChangeset for help on using the changeset viewer.