Skip to:
Content

BuddyPress.org

Changeset 10092


Ignore:
Timestamp:
09/06/2015 02:06:55 PM (9 years ago)
Author:
imath
Message:

Unit tests: make sure to test bp_upload_dir() in non ms configs too

Fixes #6473

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/functions.php

    r9844 r10092  
    604604     * @group bp_upload_dir
    605605     */
    606     public function test_bp_upload_dir_ms() {
    607         if ( ! is_multisite() ) {
    608             $this->markTestSkipped( __METHOD__ . ' is a multisite-only test.' );
     606    public function test_bp_upload_dir() {
     607        $expected_upload_dir = wp_upload_dir();
     608
     609        if ( is_multisite() ) {
     610            $b = $this->factory->blog->create();
     611            switch_to_blog( $b );
    609612        }
    610613
    611         $expected_upload_dir = wp_upload_dir();
    612 
    613         $b = $this->factory->blog->create();
    614 
    615         switch_to_blog( $b );
    616 
    617614        $tested_upload_dir = bp_upload_dir();
    618615
    619         restore_current_blog();
     616        if ( is_multisite() ) {
     617            restore_current_blog();
     618        }
    620619
    621620        $this->assertSame( $expected_upload_dir, $tested_upload_dir );
Note: See TracChangeset for help on using the changeset viewer.