[wp-trac] [WordPress Trac] #57774: Add some initial PHPUnit tests for `WP_Filesystem_Direct`

WordPress Trac noreply at wordpress.org
Mon Mar 18 00:25:54 UTC 2024


#57774: Add some initial PHPUnit tests for `WP_Filesystem_Direct`
---------------------------------------------+-----------------------------
 Reporter:  costdev                          |       Owner:  hellofromTonya
     Type:  task (blessed)                   |      Status:  reopened
 Priority:  normal                           |   Milestone:  6.5
Component:  Build/Test Tools                 |     Version:  2.5
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------

Comment (by costdev):

 I agree that we should establish the exact cause of the errors first.

 For example, maybe the test runner isn't running with `FS_METHOD` set to
 `direct`.

 So far, I see "Operation not permitted" for `chown/chgrp()`, and
 "Directory not empty" for `rmdir()`.

 The first seems clear as a permissions issue, but the error occurs in the
 actual class file, not the test file. That points to a legitimate error
 when trying to use the direct class in that environment.

 For the "Directory not empty" failure, while I could theorise about
 possible causes, I'd be very curious to see further details specifically
 from those environments.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57774#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list