Tests: Update wp_unique_filename()
unit tests to account for sanitize_file_name()
removing accents.
Follow-up to [48603]. See #22363. git-svn-id: https://develop.svn.wordpress.org/trunk@48604 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c7783dc49a
commit
674e7a2283
@ -176,10 +176,10 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
$this->assertFileNotExists( $testdir . 'test-image-1.png' );
|
||||
|
||||
// Check special chars.
|
||||
$this->assertEquals( 'testtést-imagé.png', wp_unique_filename( $testdir, 'testtést-imagé.png' ), 'Filename with special chars failed' );
|
||||
$this->assertEquals( 'testtest-image.png', wp_unique_filename( $testdir, 'testtést-imagé.png' ), 'Filename with special chars failed' );
|
||||
|
||||
// Check special chars with potential conflicting name.
|
||||
$this->assertEquals( 'tést-imagé.png', wp_unique_filename( $testdir, 'tést-imagé.png' ), 'Filename with special chars failed' );
|
||||
$this->assertEquals( 'test-image-1.png', wp_unique_filename( $testdir, 'tést-imagé.png' ), 'Filename with special chars failed' );
|
||||
|
||||
// Check with single quotes in name (somehow).
|
||||
$this->assertEquals( 'abcdefgh.png', wp_unique_filename( $testdir, "abcdefg'h.png" ), 'File with quote failed' );
|
||||
|
Loading…
Reference in New Issue
Block a user