WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/11/2018 04:03:23 AM (11 months ago)
Author:
SergeyBiryukov
Message:

Privacy: Revert [43614] from the 4.9 branch.

This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

See #43985.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

    • Property svn:mergeinfo changed
      /trunkreverse-merged: 43568
  • branches/4.9/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php

    r43614 r43705  
    4040     * @since 4.9.6
    4141     */
    42     public function setUp() {
     42    function setUp() {
    4343        parent::setUp();
    4444        reset_phpmailer_instance();
     
    5050     * @since 4.9.6
    5151     */
    52     public function tearDown() {
     52    function tearDown() {
    5353        reset_phpmailer_instance();
    5454        parent::tearDown();
     
    9696        $email_sent = wp_privacy_send_personal_data_export_email( $request_id );
    9797        $this->assertWPError( $email_sent );
    98         $this->assertSame( 'invalid_request', $email_sent->get_error_code() );
     98        $this->assertSame( 'invalid', $email_sent->get_error_code() );
    9999
    100100        $request_id = PHP_INT_MAX;
    101101        $email_sent = wp_privacy_send_personal_data_export_email( $request_id );
    102102        $this->assertWPError( $email_sent );
    103         $this->assertSame( 'invalid_request', $email_sent->get_error_code() );
     103        $this->assertSame( 'invalid', $email_sent->get_error_code() );
    104104    }
    105105
     
    112112        add_filter( 'wp_mail_from', '__return_empty_string' ); // Cause `wp_mail()` to return false.
    113113        $email_sent = wp_privacy_send_personal_data_export_email( self::$request_id );
     114        remove_filter( 'wp_mail_from', '__return_empty_string' );
    114115
    115116        $this->assertWPError( $email_sent );
    116         $this->assertSame( 'privacy_email_error', $email_sent->get_error_code() );
     117        $this->assertSame( 'error', $email_sent->get_error_code() );
    117118    }
    118119
     
    125126        add_filter( 'wp_privacy_export_expiration', array( $this, 'modify_export_expiration' ) );
    126127        wp_privacy_send_personal_data_export_email( self::$request_id );
     128        remove_filter( 'wp_privacy_export_expiration', array( $this, 'modify_export_expiration' ) );
    127129
    128130        $mailer = tests_retrieve_phpmailer_instance();
     
    151153        add_filter( 'wp_privacy_personal_data_email_content', array( $this, 'modify_email_content' ), 10, 2 );
    152154        wp_privacy_send_personal_data_export_email( self::$request_id );
     155        remove_filter( 'wp_privacy_personal_data_email_content', array( $this, 'modify_email_content' ) );
    153156
    154157        $mailer = tests_retrieve_phpmailer_instance();
Note: See TracChangeset for help on using the changeset viewer.