Make WordPress Core


Ignore:
Timestamp:
05/28/2024 05:25:06 AM (20 months ago)
Author:
peterwilsoncc
Message:

Build/Test Tools: Assert files exist/do not exist directly.

Replaces various boolean assertions wrapping file_exists() with either assertFileExists() or assertFileDoesNotExist() as appropriate for the test.

Props peterwilsoncc, mukesh27.
See #60705.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/fonts/font-library/fontLibraryHooks.php

    r57868 r58221  
    4747        wp_delete_post( $font_face_id, true );
    4848
    49         $this->assertFalse( file_exists( $font_path ), 'The font file should have been deleted when the post was deleted.' );
    50         $this->assertTrue( file_exists( $other_font_path ), 'The other font file should exist.' );
     49        $this->assertFileDoesNotExist( $font_path, 'The font file should have been deleted when the post was deleted.' );
     50        $this->assertFileExists( $other_font_path, 'The other font file should exist.' );
    5151    }
    5252
Note: See TracChangeset for help on using the changeset viewer.