[wp-trac] [WordPress Trac] #63443: ZIP tests not checking potential clean directory

WordPress Trac noreply at wordpress.org
Wed May 14 03:17:03 UTC 2025


#63443: ZIP tests not checking potential clean directory
-------------------------------------------------+-------------------------
 Reporter:  SirLouen                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  External Libraries                   |     Version:
 Severity:  trivial                              |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:  tests
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by aslamdoctor):

 I have created a PR for this.

 **Instructions for testing:**
 1. Manually create "archive" directory under
 `/tests/phpunit/data/filesystem`
 2. Update the code in both files where it says `$this->assertSame( 1,
 $filter->get_call_count() );` to `$this->assertSame( 2,
 $filter->get_call_count() );`. By doing this, it will intentionally fail
 the test.
 3. Now check the "archive" directory is still there under
 `/tests/phpunit/data/filesystem`.
 4. It should be removed in any case whether the test fails or passes.

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


More information about the wp-trac mailing list