Make WordPress Core

Changeset 901 in tests for trunk/tests/test_uploads.php


Ignore:
Timestamp:
07/12/2012 08:21:51 PM (13 years ago)
Author:
convissor
Message:

Make a subdir to test in to keep everything in /tmp getting removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/test_uploads.php

    r894 r901  
    5555     */
    5656    function test_upload_dir_absolute() {
     57        $path = '/tmp/wp-unit-test';
    5758        // wp_upload_dir() with an absolute upload path
    58         update_option( 'upload_path', '/tmp' );
     59        update_option( 'upload_path', $path );
    5960        // doesn't make sense to use an absolute file path without setting the url path
    6061        update_option( 'upload_url_path', '/baz' );
    6162        $info = wp_upload_dir();
    6263        $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'] );
    6465        $this->assertEquals( gmstrftime('/%Y/%m'), $info['subdir'] );
    6566        $this->assertEquals( '', $info['error'] );
Note: See TracChangeset for help on using the changeset viewer.