[wp-trac] [WordPress Trac] #44233: Add missing unit tests for exporting personal data by username or email address

WordPress Trac noreply at wordpress.org
Mon Aug 27 14:48:33 UTC 2018


#44233: Add missing unit tests for exporting personal data by username or email
address
-------------------------+------------------------
 Reporter:  desrosj      |       Owner:  desrosj
     Type:  enhancement  |      Status:  reviewing
 Priority:  low          |   Milestone:  4.9.9
Component:  Privacy      |     Version:  4.9.6
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------------

Comment (by desrosj):

 I did a poor job summarizing the conditions the tests fail locally under
 in my last comment. Sorry for that!

 Those two test mothods are failing locally on Windows and MacOS. I am
 using VVV.

 Ideally, the filesystem should be mocked for these tests. But, as far as I
 can tell, this is blocked by #44204 (the privacy functions currently do
 not utilize the WP Filesystem API). It might also be nice to utilize
 [https://github.com/mikey179/vfsStream vfsStream] for these and similar
 tests, but that lacks PHP 5.2 support. These tests could easily be skipped
 on the PHP 5.2 build, though.

 [attachment:"44233.5.diff"] avoids the mode parameter of `mkdir()` (was a
 remnant of me trying different approaches) and skips the two test methods
 that are failing if the directory permissions are not able to be changed
 correctly.

 One thing to point out with this approach is that if something changes in
 Travis and the tests are skipped because permissions are not changed
 correctly, the assertions would silently stop being tested.

 [https://travis-ci.org/desrosj/wordpress-develop/builds/421126432 Latest
 passing build]

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


More information about the wp-trac mailing list