xwp / wp-dependency-minification

Dependency Minification plugin for WordPress
http://wordpress.org/plugins/dependency-minification/
52 stars 10 forks source link

Add phpunit tests #6

Open westonruter opened 11 years ago

westonruter commented 10 years ago

This is sorely needed, and should be done before merging any new feature branches. Regressions are hard to catch.

lkraav commented 10 years ago

Has anyone gotten started? I'm not sure I know enough phpunit to start from scratch, but I've worked with WP core tests so could probably pick up some test writing duties here.

westonruter commented 10 years ago

No work has been started on this, no.

For a model to follow for unit testing, we can use Stream as an example: https://github.com/x-team/wp-stream/tree/develop/tests

lkraav commented 10 years ago

Hmmm. Looks nice. That's still a big barrier for me to understand what the minimal required bootstrapping code is to get a minimal wp-dep-min test going. Is @jonathanbardo maybe able to create / adapt Stream's testing bootstrap for this project with reasonably low effort?

jonathanbardo commented 10 years ago

@lkraav I can certainly take a look at this! I'll put it in my todo for next week!

jonathanbardo commented 10 years ago

@Ikraav I made the starting skeleton for this plugin. If you run phpunit inside of VVV in wordpress-delelop, you should have a successful result. Now we need to start writing tests. There is one example function in the Test_Dep_Min_Admin class.

westonruter commented 10 years ago

@lkraav the test skeleton has been added in 6bbb1e1. Please work off of the develop branch.