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:
parent
6df1337645
commit
e223663d3d
@ -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;
|
Loading…
Reference in New Issue
Block a user