Make WordPress Core


Ignore:
Timestamp:
06/01/2022 02:16:39 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Tests: Require the zip PHP extension in block templates export file test.

This avoids a test failure if the ZipArchive class is missing.

Additionally, this commit replaces an inline check for the ZipArchive class in personal data export file tests with a @requires annotation, for consistency with similar PHP extension requirements in other tests.

Follow-up to [44786], [51415], [52286].

See #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/privacy/wpPrivacyGeneratePersonalDataExportFile.php

    r51568 r53454  
    1313 * @group privacy
    1414 * @covers ::wp_privacy_generate_personal_data_export_file
     15 * @requires extension zip
    1516 *
    1617 * @since 5.2.0
     
    6869
    6970        $this->export_file_name = '';
    70 
    71         if ( ! class_exists( 'ZipArchive' ) ) {
    72             $this->markTestSkipped( 'The ZipArchive class is missing.' );
    73         }
    7471
    7572        if ( ! $this->remove_exports_dir() ) {
Note: See TracChangeset for help on using the changeset viewer.