Changeset 43640
- Timestamp:
- 09/13/2018 05:25:31 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/privacy/wpPrivacyDeleteOldExportFiles.php
r43292 r43640 12 12 * 13 13 * @group privacy 14 * @covers wp_privacy_delete_old_export_files14 * @covers ::wp_privacy_delete_old_export_files 15 15 * 16 16 * @since 4.9.6 … … 144 144 $this->assertTrue( file_exists( self::$index_path ) ); 145 145 } 146 147 /** 148 * Test the correct files are deleted when the expiration time is filtered. 149 * 150 * @since 4.9.9 151 */ 152 public function test_filtered_expiration_time() { 153 add_filter( 'wp_privacy_export_expiration', array( $this, 'filter_export_file_expiration_time' ) ); 154 155 wp_privacy_delete_old_export_files(); 156 $this->assertTrue( file_exists( self::$active_export_file ) ); 157 $this->assertTrue( file_exists( self::$expired_export_file ) ); 158 159 remove_filter( 'wp_privacy_export_expiration', array( $this, 'filter_export_file_expiration_time' ) ); 160 } 161 162 /** 163 * Filters the expiration time for export files. 164 * 165 * @since 4.9.9 166 * 167 * @return int New, longer expiration time. 168 */ 169 public function filter_export_file_expiration_time() { 170 return 6 * DAY_IN_SECONDS; 171 } 146 172 }
Note: See TracChangeset
for help on using the changeset viewer.