diff options
Diffstat (limited to 'ext/standard/tests/file/basename-win32.phpt')
-rw-r--r-- | ext/standard/tests/file/basename-win32.phpt | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/standard/tests/file/basename-win32.phpt b/ext/standard/tests/file/basename-win32.phpt index 5fd0f9659f..996b060cea 100644 --- a/ext/standard/tests/file/basename-win32.phpt +++ b/ext/standard/tests/file/basename-win32.phpt @@ -10,10 +10,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { ?> --FILE-- <?php -/* +/* * proto string basename(string path [, string suffix]) * Function is implemented in ext/standard/string.c - */ + */ $file_paths = array ( /* simple paths */ array("bar"), @@ -33,15 +33,15 @@ $file_paths = array ( array("bar.zip", "bar.zip"), array("\\foo\\bar.zip", ".zip"), array("foo\\bar.zip", ".zip"), - array("\\bar.zip", ".zip"), + array("\\bar.zip", ".zip"), /* paths with suffix and trailing slashes with suffix removal*/ array("bar.zip\\", ".zip"), array("\\bar.zip\\", ".zip"), array("\\foo\\bar.zip\\", ".zip"), array("foo\\bar.zip\\", ".zip"), - array("\\bar.zip\\", ".zip"), - + array("\\bar.zip\\", ".zip"), + /* paths with basename only suffix, with suffix removal*/ array("\\.zip", ".zip"), array(".zip", ".zip"), @@ -90,7 +90,7 @@ $file_path_variations = array ( /* path with spaces */ array(" "), array(' '), - + /* empty paths */ array(""), array(''), @@ -104,8 +104,8 @@ function check_basename( $path_arrays ) { if( 1 == count($path) ) { // no suffix provided var_dump( basename($path[0]) ); } else { // path as well as suffix provided, - var_dump( basename($path[0], $path[1]) ); - } + var_dump( basename($path[0], $path[1]) ); + } } } @@ -116,13 +116,13 @@ echo "\n*** Testing possible variations in path and suffix ***\n"; check_basename( $file_path_variations ); echo "\n*** Testing error conditions ***\n"; -// zero arguments +// zero arguments var_dump( basename() ); // more than expected no. of arguments var_dump( basename("\\blah\\tmp\\bar.zip", ".zip", ".zip") ); -// passing invalid type arguments +// passing invalid type arguments $object = new stdclass; var_dump( basename( array("string\\bar") ) ); var_dump( basename( array("string\\bar"), "bar" ) ); |