Make WordPress Core


Ignore:
Timestamp:
06/22/2020 10:38:11 PM (4 years ago)
Author:
whyisjake
Message:

Privacy: Use relative paths for exported personal data.

Ensures back-compat while moving to paths off of the /exports directory.

Fixes: #44038.

Props: allendav, mrTall, desrosj, garrett-eclipse, cameronamcintyre, nmenescardi, xkon, whyisjake, davidbaumwald.

File:
1 edited

Legend:

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

    r47144 r48127  
    4545
    4646    /**
    47      * Export File Url.
    48      *
    49      * @since 5.2.0
     47     * Export Url.
     48     *
     49     * @since 5.5.0
     50     *
     51     * @var string $export_url
     52     */
     53    protected static $export_url;
     54
     55    /**
     56     * Export File Name.
     57     *
     58     * @since 5.5.0
     59     *
     60     * @var string $export_file_name
     61     */
     62    protected static $export_file_name;
     63
     64    /**
     65     * Export File URL.
     66     *
     67     * @since 5.5.0
    5068     *
    5169     * @var string $export_file_url
     
    132150    public static function wpSetUpBeforeClass( $factory ) {
    133151        self::$requester_email      = 'requester@example.com';
    134         self::$export_file_url      = wp_privacy_exports_url() . 'wp-personal-data-file-Wv0RfMnGIkl4CFEDEEkSeIdfLmaUrLsl.zip';
     152        self::$export_url           = wp_privacy_exports_url();
     153        self::$export_file_name     = 'wp-personal-data-file-Wv0RfMnGIkl4CFEDEEkSeIdfLmaUrLsl.zip';
     154        self::$export_file_url      = self::$export_url . self::$export_file_name;
    135155        self::$request_id           = wp_create_user_request( self::$requester_email, 'export_personal_data' );
    136156        self::$page_index_first     = 1;
     
    503523     */
    504524    public function test_return_response_with_export_file_url_when_not_sent_as_email_for_last_exporter_on_last_page() {
    505         update_post_meta( self::$request_id, '_export_file_url', self::$export_file_url );
     525        update_post_meta( self::$request_id, '_export_file_name', self::$export_file_name );
    506526
    507527        // Process data, given the last exporter, on the last page and not send as email.
     
    529549     */
    530550    public function test_return_response_without_export_file_url_when_sent_as_email_for_last_exporter_on_last_page() {
    531         update_post_meta( self::$request_id, '_export_file_url', self::$export_file_url );
     551        update_post_meta( self::$request_id, '_export_file_name', self::$export_file_name );
    532552
    533553        // Process data, given the last exporter, on the last page and send as email.
Note: See TracChangeset for help on using the changeset viewer.