Changeset 51462 for trunk/tests/phpunit/tests/privacy/wpPrivacySendErasureFulfillmentNotification.php
- Timestamp:
- 07/19/2021 02:00:11 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/privacy/wpPrivacySendErasureFulfillmentNotification.php
r51129 r51462 115 115 116 116 $mailer = tests_retrieve_phpmailer_instance(); 117 $this->assert Contains( self::$requester_email, $mailer->get_recipient( 'to' )->address );118 $this->assert Contains( 'Erasure Request Fulfilled', $mailer->get_sent()->subject );119 $this->assert Contains( 'Your request to erase your personal data', $mailer->get_sent()->body );120 $this->assert Contains( 'has been completed.', $mailer->get_sent()->body );121 $this->assert Contains( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $mailer->get_sent()->body );122 $this->assert Contains( home_url(), $mailer->get_sent()->body );123 124 $this->assert NotContains( 'you can also read our privacy policy', $mailer->get_sent()->body );117 $this->assertStringContainsString( self::$requester_email, $mailer->get_recipient( 'to' )->address ); 118 $this->assertStringContainsString( 'Erasure Request Fulfilled', $mailer->get_sent()->subject ); 119 $this->assertStringContainsString( 'Your request to erase your personal data', $mailer->get_sent()->body ); 120 $this->assertStringContainsString( 'has been completed.', $mailer->get_sent()->body ); 121 $this->assertStringContainsString( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $mailer->get_sent()->body ); 122 $this->assertStringContainsString( home_url(), $mailer->get_sent()->body ); 123 124 $this->assertStringNotContainsString( 'you can also read our privacy policy', $mailer->get_sent()->body ); 125 125 $this->assertTrue( (bool) get_post_meta( self::$request_id, '_wp_user_notified', true ) ); 126 126 } … … 145 145 $mailer = tests_retrieve_phpmailer_instance(); 146 146 147 $this->assert Contains( self::$requester_email, $mailer->get_recipient( 'to' )->address );148 $this->assert Contains( 'you can also read our privacy policy', $mailer->get_sent()->body );149 $this->assert Contains( get_privacy_policy_url(), $mailer->get_sent()->body );147 $this->assertStringContainsString( self::$requester_email, $mailer->get_recipient( 'to' )->address ); 148 $this->assertStringContainsString( 'you can also read our privacy policy', $mailer->get_sent()->body ); 149 $this->assertStringContainsString( get_privacy_policy_url(), $mailer->get_sent()->body ); 150 150 $this->assertTrue( (bool) get_post_meta( self::$request_id, '_wp_user_notified', true ) ); 151 151 } … … 163 163 164 164 // Should send an email. 165 $this->assert Contains( self::$requester_email, $mailer->get_recipient( 'to' )->address );166 $this->assert Contains( 'Erasure Request Fulfilled', $mailer->get_sent()->subject );165 $this->assertStringContainsString( self::$requester_email, $mailer->get_recipient( 'to' )->address ); 166 $this->assertStringContainsString( 'Erasure Request Fulfilled', $mailer->get_sent()->subject ); 167 167 $this->assertTrue( (bool) get_post_meta( self::$request_id, '_wp_user_notified', true ) ); 168 168 … … 270 270 $mailer = tests_retrieve_phpmailer_instance(); 271 271 272 $this->assert Contains( 'From: Tester <tester@example.com>', $mailer->get_sent()->header );272 $this->assertStringContainsString( 'From: Tester <tester@example.com>', $mailer->get_sent()->header ); 273 273 } 274 274 … … 354 354 $mailer = tests_retrieve_phpmailer_instance(); 355 355 356 $this->assert Contains( 'Solicitud de borrado completada', $mailer->get_sent()->subject );356 $this->assertStringContainsString( 'Solicitud de borrado completada', $mailer->get_sent()->subject ); 357 357 } 358 358 … … 375 375 $mailer = tests_retrieve_phpmailer_instance(); 376 376 377 $this->assert Contains( 'Löschauftrag ausgeführt', $mailer->get_sent()->subject );377 $this->assertStringContainsString( 'Löschauftrag ausgeführt', $mailer->get_sent()->subject ); 378 378 } 379 379 … … 396 396 $mailer = tests_retrieve_phpmailer_instance(); 397 397 398 $this->assert Contains( 'Solicitud de borrado completada', $mailer->get_sent()->subject );398 $this->assertStringContainsString( 'Solicitud de borrado completada', $mailer->get_sent()->subject ); 399 399 } 400 400 … … 419 419 $mailer = tests_retrieve_phpmailer_instance(); 420 420 421 $this->assert Contains( 'Löschauftrag ausgeführt', $mailer->get_sent()->subject );421 $this->assertStringContainsString( 'Löschauftrag ausgeführt', $mailer->get_sent()->subject ); 422 422 } 423 423 … … 445 445 $mailer = tests_retrieve_phpmailer_instance(); 446 446 447 $this->assert Contains( 'Erasure Request Fulfilled', $mailer->get_sent()->subject );447 $this->assertStringContainsString( 'Erasure Request Fulfilled', $mailer->get_sent()->subject ); 448 448 } 449 449 … … 474 474 $mailer = tests_retrieve_phpmailer_instance(); 475 475 476 $this->assert Contains( 'Solicitud de borrado completada', $mailer->get_sent()->subject );476 $this->assertStringContainsString( 'Solicitud de borrado completada', $mailer->get_sent()->subject ); 477 477 } 478 478 }
Note: See TracChangeset
for help on using the changeset viewer.