Changeset 51587 for trunk/tests/phpunit/tests/upload.php
- Timestamp:
- 08/09/2021 07:08:09 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/upload.php
r51568 r51587 23 23 // wp_upload_dir() with default parameters. 24 24 $info = wp_upload_dir(); 25 $subdir = gmstrftime( '/%Y/%m' );25 $subdir = date_format( date_create( 'now' ), '/Y/m' ); 26 26 27 27 $this->assertSame( get_option( 'siteurl' ) . '/wp-content/uploads' . $subdir, $info['url'] ); … … 35 35 update_option( 'upload_path', 'foo/bar' ); 36 36 $info = _wp_upload_dir(); 37 $subdir = gmstrftime( '/%Y/%m' );37 $subdir = date_format( date_create( 'now' ), '/Y/m' ); 38 38 39 39 $this->assertSame( get_option( 'siteurl' ) . '/foo/bar' . $subdir, $info['url'] ); … … 58 58 // It doesn't create the /year/month directories. 59 59 $info = _wp_upload_dir(); 60 $subdir = gmstrftime( '/%Y/%m' );60 $subdir = date_format( date_create( 'now' ), '/Y/m' ); 61 61 62 62 $this->assertSame( '/baz' . $subdir, $info['url'] ); … … 84 84 // It doesn't create the /year/month directories. 85 85 $info = _wp_upload_dir(); 86 $subdir = gmstrftime( '/%Y/%m' );86 $subdir = date_format( date_create( 'now' ), '/Y/m' ); 87 87 88 88 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/asdf' . $subdir, $info['url'] ); … … 99 99 // It doesn't create the /year/month directories. 100 100 $info = _wp_upload_dir(); 101 $subdir = gmstrftime( '/%Y/%m' );101 $subdir = date_format( date_create( 'now' ), '/Y/m' ); 102 102 103 103 $this->assertSame( get_option( 'siteurl' ) . '/wp-content/uploads' . $subdir, $info['url'] );
Note: See TracChangeset
for help on using the changeset viewer.