From 674e7a2283aad158defbf8aebaa0a47115d6fe1c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 24 Jul 2020 18:17:49 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/functions.php b/tests/phpunit/tests/functions.php index db691131ed..ad7ba280d9 100644 --- a/tests/phpunit/tests/functions.php +++ b/tests/phpunit/tests/functions.php @@ -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' );