mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Tests: Replace assertFileNotExists() with assertFileDoesNotExist().
The `assertFileNotExists()` method was hard deprecated in PHPUnit 9.1 and the functionality will be removed in PHPUnit 10.0. The `assertFileDoesNotExist()` method was introduced as a replacement in PHPUnit 9.1. This new PHPUnit method is polyfilled by the PHPUnit Polyfills and switching to it will future-proof the tests some more. References: * https://github.com/sebastianbergmann/phpunit/blob/9.1.5/ChangeLog-9.1.md#910---2020-04-03 * https://github.com/sebastianbergmann/phpunit/issues/4076 Follow-up to [51559-51563]. Props jrf. See #46149. git-svn-id: https://develop.svn.wordpress.org/trunk@51564 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -173,7 +173,7 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
// Check number is appended for file already exists.
|
||||
$this->assertFileExists( $testdir . 'test-image.png', 'Test image does not exist' );
|
||||
$this->assertSame( 'test-image-1.png', wp_unique_filename( $testdir, 'test-image.png' ), 'Number not appended correctly' );
|
||||
$this->assertFileNotExists( $testdir . 'test-image-1.png' );
|
||||
$this->assertFileDoesNotExist( $testdir . 'test-image-1.png' );
|
||||
|
||||
// Check special chars.
|
||||
$this->assertSame( 'testtest-image.png', wp_unique_filename( $testdir, 'testtést-imagé.png' ), 'Filename with special chars failed' );
|
||||
|
||||
Reference in New Issue
Block a user