@@ -163,7 +163,7 @@ private function remove_exports_dir() {
163163 public function test_rejects_remove_requests () {
164164 $ request_id = wp_create_user_request ( 'removal-requester@example.com ' , 'remove_personal_data ' );
165165
166- $ this ->setExpectedException ( 'WPDieException ' );
166+ $ this ->expectException ( 'WPDieException ' );
167167 $ this ->expectOutputString ( '{"success":false,"data":"Invalid request ID when generating export file."} ' );
168168 wp_privacy_generate_personal_data_export_file ( $ request_id );
169169 }
@@ -174,7 +174,7 @@ public function test_rejects_remove_requests() {
174174 * @ticket 44233
175175 */
176176 public function test_invalid_request_id () {
177- $ this ->setExpectedException ( 'WPDieException ' );
177+ $ this ->expectException ( 'WPDieException ' );
178178 $ this ->expectOutputString ( '{"success":false,"data":"Invalid request ID when generating export file."} ' );
179179 wp_privacy_generate_personal_data_export_file ( 123456789 );
180180 }
@@ -194,7 +194,7 @@ public function test_rejects_requests_with_bad_email_addresses() {
194194 )
195195 );
196196
197- $ this ->setExpectedException ( 'WPDieException ' );
197+ $ this ->expectException ( 'WPDieException ' );
198198 $ this ->expectOutputString ( '{"success":false,"data":"Invalid email address when generating export file."} ' );
199199 wp_privacy_generate_personal_data_export_file ( $ request_id );
200200 }
@@ -208,7 +208,7 @@ public function test_detect_cannot_create_folder() {
208208 // Create a file with the folder name to ensure the function cannot create a folder.
209209 touch ( untrailingslashit ( self ::$ exports_dir ) );
210210
211- $ this ->setExpectedException ( 'WPDieException ' );
211+ $ this ->expectException ( 'WPDieException ' );
212212 $ this ->expectOutputString ( '{"success":false,"data":"Unable to create export folder."} ' );
213213 wp_privacy_generate_personal_data_export_file ( self ::$ export_request_id );
214214 }
0 commit comments