File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
tests/phpunit/tests/filesystem/wpFilesystemDirect Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Tests for the WP_Filesystem_Direct::getchmod() method.
4+ *
5+ * @package WordPress
6+ */
7+
8+ require_once __DIR__ . '/base.php ' ;
9+
10+ /**
11+ * @group admin
12+ * @group filesystem
13+ * @group filesystem-direct
14+ *
15+ * @covers WP_Filesystem_Direct::getchmod
16+ */
17+ class Tests_Filesystem_WpFilesystemDirect_Getchmod extends WP_Filesystem_Direct_UnitTestCase {
18+
19+ /**
20+ * Tests that `WP_Filesystem_Direct::getchmod()` returns
21+ * the permissions for a path.
22+ *
23+ * @dataProvider data_paths_that_do_not_exist
24+ * @dataProvider data_paths_that_exist
25+ *
26+ * @ticket 57774
27+ *
28+ * @param string $path The path.
29+ */
30+ public function test_should_get_chmod ( $ path ) {
31+ $ actual = self ::$ filesystem ->getchmod ( self ::$ file_structure ['test_dir ' ]['path ' ] . $ path );
32+ $ this ->assertTrue ( '' !== $ actual );
33+ }
34+
35+ }
You can’t perform that action at this time.
0 commit comments