Changeset 30658 for trunk/tests/phpunit/tests/upload.php
- Timestamp:
- 11/30/2014 07:05:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/upload.php
r29120 r30658 1 1 <?php 2 3 4 2 /** 5 3 * @group upload … … 11 9 12 10 function setUp() { 13 if ( is_multisite() ) 11 if ( is_multisite() ) { 14 12 $this->knownUTBug( 35 ); 13 } 15 14 15 $this->_reset_options(); 16 16 parent::setUp(); 17 return; 17 } 18 19 function _reset_options() { 18 20 // system defaults 19 21 update_option( 'upload_path', 'wp-content/uploads' ); 20 22 update_option( 'upload_url_path', '' ); 21 23 update_option( 'uploads_use_yearmonth_folders', 1 ); 22 }23 24 function tearDown() {25 $this->remove_added_uploads();26 27 parent::tearDown();28 24 } 29 25 … … 41 37 update_option( 'upload_path', 'foo/bar' ); 42 38 $info = wp_upload_dir(); 39 $this->delete_folders( ABSPATH . 'foo' ); 40 43 41 $this->assertEquals( get_option( 'siteurl' ) . '/foo/bar/' . gmstrftime('%Y/%m'), $info['url'] ); 44 42 $this->assertEquals( ABSPATH . 'foo/bar/' . gmstrftime('%Y/%m'), $info['path'] ); … … 57 55 update_option( 'upload_url_path', '/baz' ); 58 56 $info = wp_upload_dir(); 57 $this->delete_folders( $path ); 58 59 59 $this->assertEquals( '/baz/' . gmstrftime('%Y/%m'), $info['url'] ); 60 60 $this->assertEquals( "$path/" . gmstrftime('%Y/%m'), $info['path'] );
Note: See TracChangeset
for help on using the changeset viewer.