[wp-trac] [WordPress Trac] #56350: Allow exact search in REST API

WordPress Trac noreply at wordpress.org
Fri Aug 19 00:21:51 UTC 2022


#56350: Allow exact search in REST API
-------------------------------------------------+-------------------------
 Reporter:  jimmyh61                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch needs-      |     Focuses:  rest-api,
  testing needs-testing-info has-unit-tests      |  performance
-------------------------------------------------+-------------------------
Changes (by ironprogrammer):

 * keywords:  good-first-bug has-patch needs-testing needs-testing-info =>
     good-first-bug has-patch needs-testing needs-testing-info has-unit-
     tests


Comment:

 Great collaboration, @jimmyh61 and @johnregan3!

 @johnregan3, would you be able to add "optional" `$message` params to the
 assertions in
 [https://core.trac.wordpress.org/attachment/ticket/56350/56350.tests.improved.diff
 56350.tests.improved.diff]?

 Why? Because the test contains multiple assertions,
 [https://make.wordpress.org/core/handbook/testing/automated-testing
 /writing-phpunit-tests/#using-assertions it's ideal for error messages to
 indicate why a particular assertion failed].

 I'm not certain the third assertion is required, since that seems more
 like a test that `$request` didn't reset, which is out of scope here.

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


More information about the wp-trac mailing list