[wp-trac] [WordPress Trac] #42282: Provide means of executing PHPUnit continuously over watched files in local environments

WordPress Trac noreply at wordpress.org
Wed Feb 21 22:00:28 UTC 2018


#42282: Provide means of executing PHPUnit continuously over watched files in local
environments
-------------------------------+-----------------------
 Reporter:  iandunn            |       Owner:  iandunn
     Type:  enhancement        |      Status:  assigned
 Priority:  normal             |   Milestone:  5.0
Component:  Build/Test Tools   |     Version:  4.9
 Severity:  normal             |  Resolution:
 Keywords:  needs-docs commit  |     Focuses:
-------------------------------+-----------------------

Comment (by pento):

 This seems fairly annoying to remember to run the right tests and watch
 the right files, particularly with how spaghetti-ish WordPress call graphs
 are.

 I like how Jest and such have the tests in each module folder, but that's
 obviously not an option for Core's PHP.

 I wonder if it's possible to have a test group header at the top of each
 source file, that tells the watch job what tests should be run when that
 file changes? Eg, the header of `class-wp-community-events.php` might look
 like:

 {{{#!php
 /**
  * Administration: Community Events class.
  *
  * @package WordPress
  * @subpackage Administration
  * @since 4.8.0
  *
  * @test-groups community-events
  */
 }}}

 Still not ideal, and would require a significant up-front effort. But
 maybe easier to work with long term.

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


More information about the wp-trac mailing list