Remove WC_Logger::remove
This method was added post 2.6 and does not need to be maintained/deprecated. Remove related test.
This commit is contained in:
parent
bb1ece4c31
commit
5d7665671c
|
@ -225,19 +225,4 @@ class WC_Logger {
|
|||
$handler = new WC_Log_Handler_File();
|
||||
return $handler->clear( $handle );
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove/delete the chosen file.
|
||||
*
|
||||
* @deprecated 2.7.0
|
||||
*
|
||||
* @param string $handle
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function remove( $handle ) {
|
||||
wc_deprecated_function( 'WC_Logger::remove', '2.7', 'WC_Log_Handler_File::remove' );
|
||||
$handler = new WC_Log_Handler_File();
|
||||
return $handler->remove( $handle );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,20 +46,6 @@ class WC_Tests_Logger extends WC_Unit_Test_Case {
|
|||
$this->setExpectedDeprecated( 'WC_Logger::clear' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test remove().
|
||||
*
|
||||
* @since 2.7
|
||||
*/
|
||||
public function test_remove() {
|
||||
$file = wc_get_log_file_path( 'unit-tests' );
|
||||
touch( $file );
|
||||
$log = new WC_Logger();
|
||||
$log->remove( 'unit-tests' );
|
||||
$this->assertFileNotExists( $file );
|
||||
$this->setExpectedDeprecated( 'WC_Logger::remove' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test log() complains for bad levels.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue