Changeset 46822 for trunk/tests/phpunit/tests/functions.php
- Timestamp:
- 12/06/2019 10:26:19 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r46586 r46822 194 194 $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\fg.png' ), 'Double slashed not removed' ); 195 195 $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\\fg.png' ), 'Tripple slashed not removed' ); 196 } 197 198 /** 199 * @group 42437 200 */ 201 function test_unique_filename_with_dimension_like_filename() { 202 $testdir = DIR_TESTDATA . '/images/'; 203 204 // Test collision with "dimension-like" original filename. 205 $this->assertEquals( 'one-blue-pixel-100x100-1.png', wp_unique_filename( $testdir, 'one-blue-pixel-100x100.png' ) ); 206 // Test collision with existing sub-size filename. 207 // Existing files: one-blue-pixel-100x100.png, one-blue-pixel-1-100x100.png. 208 $this->assertEquals( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.png' ) ); 196 209 } 197 210
Note: See TracChangeset
for help on using the changeset viewer.