Make WordPress Core


Ignore:
Timestamp:
03/08/2016 07:06:12 AM (9 years ago)
Author:
dd32
Message:

Tests: Merge the two different wp_normalize_path() tests.

See #35996, [36881].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/file.php

    r36881 r36882  
    176176    }
    177177
    178     /**
    179      * @dataProvider data_wp_normalize_path
    180      */
    181     function test_wp_normalize_path( $path, $expected ) {
    182         $this->assertEquals( $expected, wp_normalize_path( $path ) );
    183     }
    184     function data_wp_normalize_path() {
    185         return array(
    186             // Windows paths
    187             array( 'C:\\www\\path\\', 'C:/www/path/' ),
    188             array( 'C:\\www\\\\path\\', 'C:/www/path/' ),
    189             array( 'c:/www/path', 'C:/www/path' ),
    190             array( 'c:\\www\\path\\', 'C:/www/path/' ), // uppercase drive letter
    191             array( '\\\\Domain\\DFSRoots\\share\\path\\', '//Domain/DFSRoots/share/path/' ),
    192             array( '\\\\Server\\share\\path', '//Server/share/path' ),
    193 
    194             // Linux paths
    195             array( '/www/path/', '/www/path/' ),
    196             array( '/www/path/////', '/www/path/' ),
    197             array( '/www/path', '/www/path' ),
    198         );
    199     }
    200178}
Note: See TracChangeset for help on using the changeset viewer.