Make WordPress Core


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

    r30527 r42343  
    66class Tests_Formatting_SanitizeUser extends WP_UnitTestCase {
    77    function test_strips_html() {
    8         $input = "Captain <strong>Awesome</strong>";
     8        $input    = 'Captain <strong>Awesome</strong>';
    99        $expected = is_multisite() ? 'captain awesome' : 'Captain Awesome';
    10         $this->assertEquals($expected, sanitize_user($input));
     10        $this->assertEquals( $expected, sanitize_user( $input ) );
    1111    }
    1212
     
    1919        }
    2020
    21         $this->assertEquals( $expected, sanitize_user( "AT&amp;T" ) );
     21        $this->assertEquals( $expected, sanitize_user( 'AT&amp;T' ) );
    2222    }
    2323
     
    3030        }
    3131
    32         $this->assertEquals( $expected, sanitize_user( "AT&amp;T Test;" ) );
     32        $this->assertEquals( $expected, sanitize_user( 'AT&amp;T Test;' ) );
    3333    }
    3434
    3535    function test_strips_percent_encoded_octets() {
    3636        $expected = is_multisite() ? 'franois' : 'Franois';
    37         $this->assertEquals( $expected, sanitize_user( "Fran%c3%a7ois" ) );
     37        $this->assertEquals( $expected, sanitize_user( 'Fran%c3%a7ois' ) );
    3838    }
    3939    function test_optional_strict_mode_reduces_to_safe_ascii_subset() {
    40         $this->assertEquals("abc", sanitize_user("()~ab~ˆcˆ!", true));
     40        $this->assertEquals( 'abc', sanitize_user( '()~ab~ˆcˆ!', true ) );
    4141    }
    4242}
Note: See TracChangeset for help on using the changeset viewer.