[wp-trac] [WordPress Trac] #61530: Test tool and unit test improvements for 6.7

WordPress Trac noreply at wordpress.org
Wed Sep 18 18:34:49 UTC 2024


#61530: Test tool and unit test improvements for 6.7
--------------------------------------+---------------------
 Reporter:  jonsurrell                |       Owner:  (none)
     Type:  task (blessed)            |      Status:  new
 Priority:  normal                    |   Milestone:  6.7
Component:  Build/Test Tools          |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by hellofromTonya):

 Hmm, this changeset is not showing in Trac, but
 [https://build.trac.wordpress.org/changeset/58453 is in the build].
 Manually copying the details here for reference.

 In [changeset:"59057" 59057]:
 {{{
 #!CommitTicketReference repository="" revision="59057"
 Tests: Introduce assertion for comparing file paths independent of OS-
 specifics.

 Introduces
 `WP_UnitTestCase_Base::assertSamePathIgnoringDirectorySeparators()` and an
 associated helper method
 `WP_UnitTestCase_Base::normalizeDirectorySeparatorsInPath()` to allow for
 comparing two file path strings independently of OS-specific differences.

 The normalization is done in a separate method to also allow this method
 to be used for path normalization within test methods themselves, like for
 normalizing a group of paths in an array.

 The pretty specific method name for the helper
 (`normalizeDirectorySeparatorsInPath()`) is an attempt to prevent naming
 conflicts with methods which may exist in plugin test suites build on top
 of the WP Core test suite.

 Props jrf, hellofromTonya.
 See #61530.
 }}}

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


More information about the wp-trac mailing list