Make WordPress Core


Ignore:
Timestamp:
05/28/2024 05:25:06 AM (22 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/privacy/wpPrivacyGeneratePersonalDataExportFile.php

    r58097 r58221  
    290290        wp_privacy_generate_personal_data_export_file( self::$export_request_id );
    291291
    292         $this->assertTrue( file_exists( self::$exports_dir . 'index.php' ) );
     292        $this->assertFileExists( self::$exports_dir . 'index.php' );
    293293    }
    294294
     
    301301        wp_privacy_generate_personal_data_export_file( self::$export_request_id );
    302302
    303         $this->assertTrue( file_exists( $this->export_file_name ) );
     303        $this->assertFileExists( $this->export_file_name );
    304304    }
    305305
     
    409409
    410410        wp_privacy_generate_personal_data_export_file( self::$export_request_id );
    411         $this->assertTrue( file_exists( $this->export_file_name ) );
     411        $this->assertFileExists( $this->export_file_name );
    412412
    413413        // Create a temporary export directory for the test's export files.
Note: See TracChangeset for help on using the changeset viewer.