Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Commit fb32311

Browse files
committed
Do not assume parity between dirname() and wp_unix_dirname() for multiple slashes
1 parent 7bcbd2d commit fb32311

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/Blueprints/Tests/Unit/Steps/StepTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function setUp(): void {
4747
$this->execution_context = LocalFilesystem::create( $this->execution_context_path );
4848

4949
$base_site_root = wp_join_unix_paths( $tmp_dir, 'blueprint_test_base_site' );
50-
if ( is_dir( $base_site_root ) && file_exists( $base_site_root . '/wp-load.php' ) ) {
50+
if ( is_dir( $base_site_root ) && file_exists( wp_join_unix_paths( $base_site_root, 'wp-load.php' ) ) ) {
5151
LocalFilesystem::create( $tmp_dir )->copy(
5252
'blueprint_test_base_site',
5353
basename( $this->document_root ),

components/Filesystem/Tests/FunctionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static function wpUnixDirnameProvider() {
8484
'Trailing slash: /foo/bar/' => [ '/foo/bar/', 1, '/foo', true ],
8585

8686
// Multiple slashes
87-
'Multiple slashes: //' => [ '//', 1, '/', true ],
87+
'Multiple slashes: //' => [ '//', 1, '/', false ],
8888
'Multiple slashes: ///' => [ '///', 1, '/', false ],
8989

9090
// No slash / relative

0 commit comments

Comments
 (0)