Changeset 43614 for branches/4.9/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php
- Timestamp:
- 09/03/2018 09:00:16 PM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php
r43612 r43614 40 40 * @since 4.9.6 41 41 */ 42 function setUp() {42 public function setUp() { 43 43 parent::setUp(); 44 44 reset_phpmailer_instance(); … … 50 50 * @since 4.9.6 51 51 */ 52 function tearDown() {52 public function tearDown() { 53 53 reset_phpmailer_instance(); 54 54 parent::tearDown(); … … 96 96 $email_sent = wp_privacy_send_personal_data_export_email( $request_id ); 97 97 $this->assertWPError( $email_sent ); 98 $this->assertSame( 'invalid ', $email_sent->get_error_code() );98 $this->assertSame( 'invalid_request', $email_sent->get_error_code() ); 99 99 100 100 $request_id = PHP_INT_MAX; 101 101 $email_sent = wp_privacy_send_personal_data_export_email( $request_id ); 102 102 $this->assertWPError( $email_sent ); 103 $this->assertSame( 'invalid ', $email_sent->get_error_code() );103 $this->assertSame( 'invalid_request', $email_sent->get_error_code() ); 104 104 } 105 105 … … 112 112 add_filter( 'wp_mail_from', '__return_empty_string' ); // Cause `wp_mail()` to return false. 113 113 $email_sent = wp_privacy_send_personal_data_export_email( self::$request_id ); 114 remove_filter( 'wp_mail_from', '__return_empty_string' );115 114 116 115 $this->assertWPError( $email_sent ); 117 $this->assertSame( ' error', $email_sent->get_error_code() );116 $this->assertSame( 'privacy_email_error', $email_sent->get_error_code() ); 118 117 } 119 118 … … 126 125 add_filter( 'wp_privacy_export_expiration', array( $this, 'modify_export_expiration' ) ); 127 126 wp_privacy_send_personal_data_export_email( self::$request_id ); 128 remove_filter( 'wp_privacy_export_expiration', array( $this, 'modify_export_expiration' ) );129 127 130 128 $mailer = tests_retrieve_phpmailer_instance(); … … 153 151 add_filter( 'wp_privacy_personal_data_email_content', array( $this, 'modify_email_content' ), 10, 2 ); 154 152 wp_privacy_send_personal_data_export_email( self::$request_id ); 155 remove_filter( 'wp_privacy_personal_data_email_content', array( $this, 'modify_email_content' ) );156 153 157 154 $mailer = tests_retrieve_phpmailer_instance();
Note: See TracChangeset
for help on using the changeset viewer.