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:
Jon Surrell 2017-01-13 06:48:57 +01:00
parent bb1ece4c31
commit 5d7665671c
2 changed files with 0 additions and 29 deletions

View File

@ -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 );
}
}

View File

@ -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.
*