Since Craft ships with a copy of PHPUnit, is it possible to use that to run tests on a plugin? Or do we need to have a separate copy installed?
Asked
Active
Viewed 935 times
1 Answers
6
Yes it is possible, see this example plugin by Selvin Ortiz: https://github.com/selvinortiz/craft.loath.
You can also check out https://github.com/boboldehampsink/import for some detailed unit tests.
Bob Olde Hampsink
- 1,173
- 7
- 27
/craft/app/vendor/phpunit/phpunit/phpunit.php,/craft/app/tests/bootstrap.php, and/craft/app/tests/phpunit.xmlwhich doesn't ship in the latest version of Craft 2 anyone. – Maarten de Graaf Sep 29 '17 at 11:57