Make WordPress Core


Ignore:
Timestamp:
07/24/2020 06:17:49 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Update wp_unique_filename() unit tests to account for sanitize_file_name() removing accents.

Follow-up to [48603].

See #22363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions.php

    r47454 r48604  
    177177
    178178        // Check special chars.
    179         $this->assertEquals( 'testtést-imagé.png', wp_unique_filename( $testdir, 'testtést-imagé.png' ), 'Filename with special chars failed' );
     179        $this->assertEquals( 'testtest-image.png', wp_unique_filename( $testdir, 'testtést-imagé.png' ), 'Filename with special chars failed' );
    180180
    181181        // Check special chars with potential conflicting name.
    182         $this->assertEquals( 'tést-imagé.png', wp_unique_filename( $testdir, 'tést-imagé.png' ), 'Filename with special chars failed' );
     182        $this->assertEquals( 'test-image-1.png', wp_unique_filename( $testdir, 'tést-imagé.png' ), 'Filename with special chars failed' );
    183183
    184184        // Check with single quotes in name (somehow).
Note: See TracChangeset for help on using the changeset viewer.