- Timestamp:
- 04/29/2020 04:57:01 PM (5 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
/trunk merged: 47634-47635,47637-47638
- Property svn:mergeinfo changed
-
branches/3.8/tests/phpunit/tests/formatting/SanitizeFileName.php
r37824 r47661 43 43 $this->assertEquals( 'no-extension', sanitize_file_name( '_.no-extension' ) ); 44 44 } 45 46 /** 47 * @dataProvider data_wp_filenames 48 */ 49 function test_replaces_invalid_utf8_characters( $input, $expected ) { 50 $this->assertEquals( $expected, sanitize_file_name( $input ) ); 51 } 52 53 function data_wp_filenames() { 54 return array( 55 array( urldecode( '%B1myfile.png' ), 'myfile.png' ), 56 array( urldecode( '%B1myfile' ), 'myfile' ), 57 array( 'demo bar.png', 'demo-bar.png' ), 58 array( 'demo' . json_decode( '"\u00a0"' ) . 'bar.png', 'demo-bar.png' ), 59 ); 60 } 45 61 }
Note: See TracChangeset
for help on using the changeset viewer.