Tests: Add some test cases for path_join() with Windows paths.

Follow-up to [6984], [53457], [53460].

Props joyously.
See #55897.

git-svn-id: https://develop.svn.wordpress.org/trunk@53461 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-06-03 15:05:28 +00:00
parent 27963429a1
commit c08eca3589

View File

@ -146,12 +146,22 @@ class Tests_Functions extends WP_UnitTestCase {
*/
public function path_join_data_provider() {
return array(
// Absolute path.
// Absolute paths.
'absolute path should return path' => array(
'base' => 'base',
'path' => '/path',
'expected' => '/path',
),
'windows path with slashes' => array(
'base' => 'base',
'path' => '//path',
'expected' => '//path',
),
'windows path with backslashes' => array(
'base' => 'base',
'path' => '\\\\path',
'expected' => '\\\\path',
),
// Non-absolute paths.
'join base and path' => array(
'base' => 'base',