Skip to content

Commit 7686752

Browse files
author
costdev
committed
Add tests for ::cwd().
1 parent a1154ad commit 7686752

File tree

1 file changed

+27
-0
lines changed
  • tests/phpunit/tests/filesystem/wpFilesystemDirect

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* Tests for the WP_Filesystem_Direct::cwd() method.
4+
*
5+
* @package WordPress
6+
*/
7+
8+
/**
9+
* @group admin
10+
* @group filesystem
11+
* @group filesystem-direct
12+
*
13+
* @covers WP_Filesystem_Direct::cwd
14+
*/
15+
class Tests_Filesystem_WpFilesystemDirect_Cwd extends WP_Filesystem_Direct_UnitTestCase {
16+
17+
/**
18+
* Tests that `WP_Filesystem_Direct::cwd()` returns the current
19+
* working directory.
20+
*
21+
* @ticket 57774
22+
*/
23+
public function test_should_get_current_working_directory() {
24+
$this->assertSame( wp_normalize_path( dirname( ABSPATH ) ), wp_normalize_path( self::$filesystem->cwd() ) );
25+
}
26+
27+
}

0 commit comments

Comments
 (0)