WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/06/2021 09:45:32 PM (4 months ago)
Author:
SergeyBiryukov
Message:

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:

Follow-up to [51559-51563].

Props jrf.
See #46149.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/multisite/site.php

    r51462 r51564  
    392392            // The file on the main site should still exist. The file on the deleted site should not.
    393393            $this->assertFileExists( $file1['file'] );
    394             $this->assertFileNotExists( $file2['file'] );
     394            $this->assertFileDoesNotExist( $file2['file'] );
    395395
    396396            wpmu_delete_blog( $blog_id, true );
     
    398398            // The file on the main site should still exist. The file on the deleted site should not.
    399399            $this->assertFileExists( $file1['file'] );
    400             $this->assertFileNotExists( $file2['file'] );
     400            $this->assertFileDoesNotExist( $file2['file'] );
    401401        }
    402402
Note: See TracChangeset for help on using the changeset viewer.