Changeset 43705 for branches/4.9/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php
- Timestamp:
- 10/11/2018 04:03:23 AM (6 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
r43614 r43705 40 40 * @since 4.9.6 41 41 */ 42 publicfunction setUp() {42 function setUp() { 43 43 parent::setUp(); 44 44 reset_phpmailer_instance(); … … 50 50 * @since 4.9.6 51 51 */ 52 publicfunction tearDown() {52 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 _request', $email_sent->get_error_code() );98 $this->assertSame( 'invalid', $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 _request', $email_sent->get_error_code() );103 $this->assertSame( 'invalid', $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' ); 114 115 115 116 $this->assertWPError( $email_sent ); 116 $this->assertSame( ' privacy_email_error', $email_sent->get_error_code() );117 $this->assertSame( 'error', $email_sent->get_error_code() ); 117 118 } 118 119 … … 125 126 add_filter( 'wp_privacy_export_expiration', array( $this, 'modify_export_expiration' ) ); 126 127 wp_privacy_send_personal_data_export_email( self::$request_id ); 128 remove_filter( 'wp_privacy_export_expiration', array( $this, 'modify_export_expiration' ) ); 127 129 128 130 $mailer = tests_retrieve_phpmailer_instance(); … … 151 153 add_filter( 'wp_privacy_personal_data_email_content', array( $this, 'modify_email_content' ), 10, 2 ); 152 154 wp_privacy_send_personal_data_export_email( self::$request_id ); 155 remove_filter( 'wp_privacy_personal_data_email_content', array( $this, 'modify_email_content' ) ); 153 156 154 157 $mailer = tests_retrieve_phpmailer_instance();
Note: See TracChangeset
for help on using the changeset viewer.