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