NotionCommotion Posted September 8, 2016 Share Posted September 8, 2016 (edited) I've never used unit testing, but am starting to try. https://phpunit.de/getting-started.html describes the primary means as a phar file, but then goes on to say it is possible to use composer. Should I use one over the other? Also, any recommendations on a good tutorial? I am not overly impressed with the official getting started document. Edit1. If it is done with composer, is it restricted to a single directory, or can it be made global? Edit2. I guess it could be made global. Not sure yet how this works, but will look into. Thanks Edited September 8, 2016 by NotionCommotion Quote Link to comment https://forums.phpfreaks.com/topic/302112-should-phpunit-be-used-with-composer/ Share on other sites More sharing options...
Solution Jacques1 Posted September 8, 2016 Solution Share Posted September 8, 2016 The benefit of using composer is that you get automatic dependency management. If you rely on a phpunit.phar file, you have to manually download it on every system and make sure it's the right version. To get started, you can read existing tests of (simple) GitHub projects. If you don't like the PHP-specific resources, you can also switch to Java unit tests which work very similar. Quote Link to comment https://forums.phpfreaks.com/topic/302112-should-phpunit-be-used-with-composer/#findComment-1537200 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.