[wp-trac] [WordPress Trac] #25854: PHPUnit Configuration for Grunt

WordPress Trac noreply at wordpress.org
Wed Nov 6 23:34:08 UTC 2013


#25854: PHPUnit Configuration for Grunt
-------------------------+-----------------------------
 Reporter:  bpetty       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Unit Tests   |    Version:
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 I've taken a stab at creating some Grunt tasks for our PHPUnit tests to go
 along with our QUnit tests.

 Note that I did attempt to use [https://npmjs.org/package/grunt-phpunit
 grunt-phpunit], however, it appears to not be very mature, and requires
 configuring the directory location for tests. We make use of more advanced
 features through the configuration file (stuff like `phpVersion`
 requirements) that aren't supported with this Grunt plugin yet. See also
 [https://github.com/SaschaGalley/grunt-phpunit/issues/9 issue #9].

 Instead, this patch just makes quick and dirty use of `grunt.util.spawn`
 to provide the self-explanatory `phpunit:default`, `phpunit:ajax`, and
 `phpunit:multisite` tasks.

 I've also taken the liberty of adding the `phpunit:default` task to the
 generic `test` task along with `qunit`.

 Since this gives developers another way to run the PHPUnit tests from the
 root folder, I've moved the `phpunit.xml.dist` file back into the
 `tests/phpunit` folder out of the way (where it's still possible to run
 "phpunit" directly).

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25854>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list