mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add explicit testing for pre_get_space_used() filter.
See #30202. git-svn-id: https://develop.svn.wordpress.org/trunk@33185 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -90,5 +90,17 @@ class Tests_Multisite_Get_Space_Used extends WP_UnitTestCase {
|
||||
$this->delete_folders( $upload_dir['basedir'] );
|
||||
restore_current_blog();
|
||||
}
|
||||
|
||||
function test_get_space_used_pre_get_spaced_used_filter() {
|
||||
add_filter( 'pre_get_space_used', array( $this, '_filter_space_used' ) );
|
||||
|
||||
$this->assertEquals( 300, get_space_used() );
|
||||
|
||||
remove_filter( 'pre_get_space_used', array( $this, '_filter_space_used' ) );
|
||||
}
|
||||
|
||||
function _filter_space_used() {
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
endif;
|
||||
Reference in New Issue
Block a user