- Timestamp:
- 09/02/2020 12:35:36 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/ms-files-rewriting.php
r46586 r48937 41 41 $blog_id2 = self::factory()->blog->create( array( 'user_id' => $user_id ) ); 42 42 $info = wp_upload_dir(); 43 $this->assert Equals( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['url'] );44 $this->assert Equals( ABSPATH . 'wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['path'] );45 $this->assert Equals( gmstrftime( '/%Y/%m' ), $info['subdir'] );46 $this->assert Equals( '',$info['error'] );43 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['url'] ); 44 $this->assertSame( ABSPATH . 'wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['path'] ); 45 $this->assertSame( gmstrftime( '/%Y/%m' ), $info['subdir'] ); 46 $this->assertFalse( $info['error'] ); 47 47 48 48 switch_to_blog( $blog_id2 ); 49 49 $info2 = wp_upload_dir(); 50 50 $this->assertNotEquals( $info, $info2 ); 51 $this->assert Equals( get_option( 'siteurl' ) . '/wp-content/blogs.dir/' . get_current_blog_id() . '/files/' . gmstrftime( '%Y/%m' ), $info2['url'] );52 $this->assert Equals( ABSPATH . 'wp-content/blogs.dir/' . get_current_blog_id() . '/files/' . gmstrftime( '%Y/%m' ), $info2['path'] );53 $this->assert Equals( gmstrftime( '/%Y/%m' ), $info2['subdir'] );54 $this->assert Equals( '',$info2['error'] );51 $this->assertSame( get_option( 'siteurl' ) . '/wp-content/blogs.dir/' . get_current_blog_id() . '/files/' . gmstrftime( '%Y/%m' ), $info2['url'] ); 52 $this->assertSame( ABSPATH . 'wp-content/blogs.dir/' . get_current_blog_id() . '/files/' . gmstrftime( '%Y/%m' ), $info2['path'] ); 53 $this->assertSame( gmstrftime( '/%Y/%m' ), $info2['subdir'] ); 54 $this->assertFalse( $info2['error'] ); 55 55 restore_current_blog(); 56 56 }
Note: See TracChangeset
for help on using the changeset viewer.