Make WordPress Core

Changeset 33185


Ignore:
Timestamp:
07/13/2015 12:13:25 AM (9 years ago)
Author:
jeremyfelt
Message:

Add explicit testing for pre_get_space_used() filter.

See #30202.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/multisite/getSpaceUsed.php

    r33184 r33185  
    9191        restore_current_blog();
    9292    }
     93
     94    function test_get_space_used_pre_get_spaced_used_filter() {
     95        add_filter( 'pre_get_space_used', array( $this, '_filter_space_used' ) );
     96
     97        $this->assertEquals( 300, get_space_used() );
     98
     99        remove_filter( 'pre_get_space_used', array( $this, '_filter_space_used' ) );
     100    }
     101
     102    function _filter_space_used() {
     103        return 300;
     104    }
    93105}
    94106endif;
Note: See TracChangeset for help on using the changeset viewer.