Make WordPress Core


Ignore:
Timestamp:
10/10/2015 11:17:01 PM (10 years ago)
Author:
jeremyfelt
Message:

MS: Handle the possibility of 0 when checking a user's upload quota.

Upload space of 0 is now more possible via r35016 and should be respected rather than modified to a default of 10MB.

Fixes #34037.

File:
1 edited

Legend:

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

    r34901 r35017  
    2828    }
    2929
    30     /**
    31      * In this scenario, 10 is set as the spaced allowed when 0 is returned
    32      * by `get_space_allowed()` inside `upload_is_user_over_quota()`.
    33      *
    34      * This is likely not expected behavior.
    35      */
    3630    public function test_upload_is_user_over_quota_allowed_0_used_5() {
    3731        add_filter( 'get_space_allowed', '__return_zero' );
     
    4135        remove_filter( 'pre_get_space_used', array( $this, '_filter_space_5' ) );
    4236
    43         $this->assertFalse( $result );
     37        $this->assertTrue( $result );
    4438    }
    4539
Note: See TracChangeset for help on using the changeset viewer.