Changeset 901 in tests for trunk/tests/test_uploads.php
- Timestamp:
- 07/12/2012 08:21:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/test_uploads.php
r894 r901 55 55 */ 56 56 function test_upload_dir_absolute() { 57 $path = '/tmp/wp-unit-test'; 57 58 // wp_upload_dir() with an absolute upload path 58 update_option( 'upload_path', '/tmp');59 update_option( 'upload_path', $path ); 59 60 // doesn't make sense to use an absolute file path without setting the url path 60 61 update_option( 'upload_url_path', '/baz' ); 61 62 $info = wp_upload_dir(); 62 63 $this->assertEquals( '/baz/' . gmstrftime('%Y/%m'), $info['url'] ); 63 $this->assertEquals( '/tmp/'. gmstrftime('%Y/%m'), $info['path'] );64 $this->assertEquals( "$path/" . gmstrftime('%Y/%m'), $info['path'] ); 64 65 $this->assertEquals( gmstrftime('/%Y/%m'), $info['subdir'] ); 65 66 $this->assertEquals( '', $info['error'] );
Note: See TracChangeset
for help on using the changeset viewer.