Changeset 30286 for trunk/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 11/08/2014 09:07:05 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r30175 r30286 950 950 $this->assertEquals( gmstrftime('/%Y/%m'), $info['subdir'] ); 951 951 $this->assertEquals( '', $info['error'] ); 952 953 update_site_option( 'ms_files_rewriting', 1 );954 ms_upload_constants();955 956 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) );957 $blog_id2 = $this->factory->blog->create( array( 'user_id' => $user_id ) );958 $info = wp_upload_dir();959 $this->assertEquals( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime('%Y/%m'), $info['url'] );960 $this->assertEquals( ABSPATH . 'wp-content/uploads/' . gmstrftime('%Y/%m'), $info['path'] );961 $this->assertEquals( gmstrftime('/%Y/%m'), $info['subdir'] );962 $this->assertEquals( '', $info['error'] );963 964 switch_to_blog( $blog_id2 );965 $info2 = wp_upload_dir();966 $this->assertNotEquals( $info, $info2 );967 $this->assertEquals( get_option( 'siteurl' ) . '/wp-content/blogs.dir/' . get_current_blog_id() . '/files/' . gmstrftime('%Y/%m'), $info2['url'] );968 $this->assertEquals( ABSPATH . 'wp-content/blogs.dir/' . get_current_blog_id() . '/files/' . gmstrftime('%Y/%m'), $info2['path'] );969 $this->assertEquals( gmstrftime('/%Y/%m'), $info2['subdir'] );970 $this->assertEquals( '', $info2['error'] );971 restore_current_blog();972 update_site_option( 'ms_files_rewriting', 0 );973 952 } 974 953
Note: See TracChangeset
for help on using the changeset viewer.