Changeset 9561 for trunk/tests/phpunit/testcases/core/avatars.php
- Timestamp:
- 02/27/2015 03:00:42 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/avatars.php
r9455 r9561 5 5 */ 6 6 class BP_Tests_Avatars extends BP_UnitTestCase { 7 protected $old_current_user = 0;8 9 7 private $params = array(); 10 11 public function setUp() {12 parent::setUp();13 14 $this->old_current_user = get_current_user_id();15 $this->administrator = $this->factory->user->create( array( 'role' => 'administrator' ) );16 wp_set_current_user( $this->administrator );17 }18 19 public function tearDown() {20 parent::tearDown();21 wp_set_current_user( $this->old_current_user );22 }23 8 24 9 private function clean_existing_avatars( $type = 'user' ) { … … 59 44 } 60 45 46 $u = $this->factory->user->create(); 47 61 48 // get BP root blog's upload directory data 62 49 $upload_dir = wp_upload_dir(); … … 64 51 // create new subsite 65 52 $blog_id = $this->factory->blog->create( array( 66 'user_id' => $ this->administrator,53 'user_id' => $u, 67 54 'title' => 'Test Title', 68 55 'path' => '/path' . rand() . time() . '/',
Note: See TracChangeset
for help on using the changeset viewer.