Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPUNIT without installation

I'm sorry if the question is stupid for some reason. I'm not a phpunit expert and what I'm asking could sound ridiculous.

Is it possible to use phpunit without installation? Just "include" the libraries without installing anything on the server?

I'm asking this because at my workplace nobody wants to try some unit testing or TDDing but I'm pretty sure that I can do a better work when I program with the help of the tests and besides I want to show my coworkers that "it works" after the fact, not just by talking*.

Thanks for your help

*Talking already happened and the answer is always something like "We have too much work to do to consider these fancy things". Life seems to be too short to do a good job.

like image 882
heapOverflow Avatar asked Nov 13 '22 16:11

heapOverflow


1 Answers

The readme on PHPUnit's github repository has instructions for this. Scroll down to Using PHPUnit From a Git Checkout for a list of commands you can copy-n-paste into your shell.

One thing to make clear to your coworkers is that while writing tests in addition to your regular code may seem like more work up front, well-written tests will save you time over the long run as you fix bugs and add features. They also give you the confidence to make more drastic changes as necessary whereas you might normally consider rewriting the project from scratch.

like image 132
David Harkness Avatar answered Dec 06 '22 05:12

David Harkness