Make WordPress Core


Ignore:
Timestamp:
08/06/2021 09:45:32 PM (4 years 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/admin/includesPlugin.php

    r51419 r51564  
    404404     */
    405405    public function test_get_mu_plugins_when_mu_plugins_directory_does_not_exist() {
    406         $this->assertFileNotExists( WPMU_PLUGIN_DIR );
     406        $this->assertFileDoesNotExist( WPMU_PLUGIN_DIR );
    407407        $this->assertSame( array(), get_mu_plugins() );
    408408    }
Note: See TracChangeset for help on using the changeset viewer.