Ticket #43438: 43438.21.diff
File 43438.21.diff, 1.9 KB (added by , 6 years ago) |
---|
-
tests/phpunit/tests/ajax/PrivacyErasePersonalData.php
140 140 add_filter( 'wp_privacy_personal_data_erasers', array( $this, 'register_custom_personal_data_eraser' ) ); 141 141 142 142 $this->_setRole( 'administrator' ); 143 // erase_others_personal_data meta cap in Multisite installation is only granted to those with `manage_network` capability. 144 if ( is_multisite() ) { 145 grant_super_admin( get_current_user_id() ); 146 } 143 147 } 144 148 145 149 /** … … 149 153 remove_filter( 'wp_privacy_personal_data_erasers', array( $this, 'register_custom_personal_data_eraser' ) ); 150 154 $this->new_callback_value = ''; 151 155 156 if ( is_multisite() ) { 157 revoke_super_admin( get_current_user_id() ); 158 } 159 152 160 parent::tearDown(); 153 161 } 154 162 -
tests/phpunit/tests/ajax/PrivacyExportPersonalData.php
154 154 add_filter( 'wp_privacy_personal_data_exporters', array( $this, 'filter_register_custom_personal_data_exporter' ) ); 155 155 156 156 $this->_setRole( 'administrator' ); 157 // export_others_personal_data meta cap in Multisite installation is only granted to those with `manage_network` capability. 158 if ( is_multisite() ) { 159 grant_super_admin( get_current_user_id() ); 160 } 157 161 } 158 162 159 163 /** … … 162 166 public function tearDown() { 163 167 remove_filter( 'wp_privacy_personal_data_exporters', array( $this, 'filter_register_custom_personal_data_exporter' ) ); 164 168 169 if ( is_multisite() ) { 170 revoke_super_admin( get_current_user_id() ); 171 } 165 172 parent::tearDown(); 166 173 } 167 174