Skip to:
Content

BuddyPress.org

Ticket #6473: 6473.patch

File 6473.patch, 967 bytes (added by imath, 10 years ago)
  • tests/phpunit/testcases/core/functions.php

    diff --git tests/phpunit/testcases/core/functions.php tests/phpunit/testcases/core/functions.php
    index 2df892b..fd36eaf 100644
    class BP_Tests_Core_Functions extends BP_UnitTestCase { 
    603603         * @group bp_attachments
    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.' );
    609                 }
    610 
     606        public function test_bp_upload_dir() {
    611607                $expected_upload_dir = wp_upload_dir();
    612608
    613                 $b = $this->factory->blog->create();
    614 
    615                 switch_to_blog( $b );
     609                if ( is_multisite() ) {
     610                        $b = $this->factory->blog->create();
     611                        switch_to_blog( $b );
     612                }
    616613
    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 );
    622621        }