Changeset 30527
- Timestamp:
- 11/22/2014 09:29:40 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/SanitizeUser.php
r30515 r30527 12 12 13 13 public function test_strips_encoded_ampersand() { 14 $this->assertEquals("ATT", sanitize_user("AT&T")); 14 $expected = 'ATT'; 15 16 // Multisite forces user logins to lowercase. 17 if ( is_multisite() ) { 18 $expected = strtolower( $expected ); 19 } 20 21 $this->assertEquals( $expected, sanitize_user( "AT&T" ) ); 15 22 } 16 23 17 24 public function test_strips_encoded_ampersand_when_followed_by_semicolon() { 18 $this->assertEquals("ATT Test;", sanitize_user("AT&T Test;")); 25 $expected = 'ATT Test;'; 26 27 // Multisite forces user logins to lowercase. 28 if ( is_multisite() ) { 29 $expected = strtolower( $expected ); 30 } 31 32 $this->assertEquals( $expected, sanitize_user( "AT&T Test;" ) ); 19 33 } 20 34
Note: See TracChangeset
for help on using the changeset viewer.