Changeset 51587 for trunk/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 08/09/2021 07:08:09 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r51568 r51587 839 839 840 840 $site = get_current_site(); 841 $date = date_format( date_create( 'now' ), 'Y/m' ); 841 842 842 843 $info = wp_upload_dir(); 843 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['url'] );844 $this->assertSame( ABSPATH . 'wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['path'] );845 $this->assertSame( gmstrftime( '/%Y/%m' ), $info['subdir'] );844 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/' . $date, $info['url'] ); 845 $this->assertSame( ABSPATH . 'wp-content/uploads/' . $date, $info['path'] ); 846 $this->assertSame( '/' . $date, $info['subdir'] ); 846 847 $this->assertFalse( $info['error'] ); 847 848 … … 850 851 switch_to_blog( $blog_id ); 851 852 $info = wp_upload_dir(); 852 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/sites/' . get_current_blog_id() . '/' . gmstrftime( '%Y/%m' ), $info['url'] );853 $this->assertSame( ABSPATH . 'wp-content/uploads/sites/' . get_current_blog_id() . '/' . gmstrftime( '%Y/%m' ), $info['path'] );854 $this->assertSame( gmstrftime( '/%Y/%m' ), $info['subdir'] );853 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/sites/' . get_current_blog_id() . '/' . $date, $info['url'] ); 854 $this->assertSame( ABSPATH . 'wp-content/uploads/sites/' . get_current_blog_id() . '/' . $date, $info['path'] ); 855 $this->assertSame( '/' . $date, $info['subdir'] ); 855 856 $this->assertFalse( $info['error'] ); 856 857 restore_current_blog(); 857 858 858 859 $info = wp_upload_dir(); 859 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['url'] );860 $this->assertSame( ABSPATH . 'wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['path'] );861 $this->assertSame( gmstrftime( '/%Y/%m' ), $info['subdir'] );860 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/' . $date, $info['url'] ); 861 $this->assertSame( ABSPATH . 'wp-content/uploads/' . $date, $info['path'] ); 862 $this->assertSame( '/' . $date, $info['subdir'] ); 862 863 $this->assertFalse( $info['error'] ); 863 864 }
Note: See TracChangeset
for help on using the changeset viewer.