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 { |
603 | 603 | * @group bp_attachments |
604 | 604 | * @group bp_upload_dir |
605 | 605 | */ |
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() { |
611 | 607 | $expected_upload_dir = wp_upload_dir(); |
612 | 608 | |
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 | } |
616 | 613 | |
617 | 614 | $tested_upload_dir = bp_upload_dir(); |
618 | 615 | |
619 | | restore_current_blog(); |
| 616 | if ( is_multisite() ) { |
| 617 | restore_current_blog(); |
| 618 | } |
620 | 619 | |
621 | 620 | $this->assertSame( $expected_upload_dir, $tested_upload_dir ); |
622 | 621 | } |