- Timestamp:
- 04/29/2020 04:22:22 PM (5 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
- Property svn:mergeinfo changed
/trunk merged: 47633-47635,47637-47638
- Property svn:mergeinfo changed
-
branches/4.7/tests/phpunit/tests/formatting/SanitizeFileName.php
r37756 r47650 68 68 $this->assertEquals( 'no-extension', sanitize_file_name( '_.no-extension' ) ); 69 69 } 70 71 /** 72 * @dataProvider data_wp_filenames 73 */ 74 function test_replaces_invalid_utf8_characters( $input, $expected ) { 75 $this->assertEquals( $expected, sanitize_file_name( $input ) ); 76 } 77 78 function data_wp_filenames() { 79 return array( 80 array( urldecode( '%B1myfile.png' ), 'myfile.png' ), 81 array( urldecode( '%B1myfile' ), 'myfile' ), 82 array( 'demo bar.png', 'demo-bar.png' ), 83 array( 'demo' . json_decode( '"\u00a0"' ) . 'bar.png', 'demo-bar.png' ), 84 ); 85 } 70 86 }
Note: See TracChangeset
for help on using the changeset viewer.