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

WordPress Trac noreply at wordpress.org
Tue May 21 10:32:08 UTC 2024


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

Comment (by SergeyBiryukov):

 In [changeset:"58181" 58181]:
 {{{
 #!CommitTicketReference repository="" revision="58181"
 Tests: Use `assertSame()` in block support tests.

 This ensures that not only the return values match the expected results,
 but also that their type is the same.

 Going forward, stricter type checking by using `assertSame()` should
 generally be preferred to `assertEquals()` where appropriate, to make the
 tests more reliable.

 Includes renaming a few test classes per the naming conventions.

 Reference: [https://make.wordpress.org/core/handbook/testing/automated-
 testing/writing-phpunit-tests/#naming-and-organization Writing PHP Tests:
 Naming and Organization].

 Follow-up to [53076], [53085], [54497], [56046], [56614], [57246],
 [57491].

 See #60705.
 }}}

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


More information about the wp-trac mailing list