没有安装的PHPUNIT [英] PHPUNIT without installation

查看:97
本文介绍了没有安装的PHPUNIT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,由于某种原因,这个问题很愚蠢.我不是phpunit专家,我的要求听起来很荒谬.

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.

是否可以不安装而使用phpunit?只是包括"这些库而不在服务器上安装任何东西?

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

我之所以这样问,是因为在我的工作场所,没人愿意尝试一些单元测试或TDDing,但是我很确定在借助测试进行编程时,我可以做得更好,而且我还想展示我的同事在事后证明有效",而不仅仅是通过交谈*.

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*.

感谢您的帮助

*已经开始进行对话了,答案总是像我们有太多工作要做,无法考虑这些奇特的事情".人生似乎太短了,无法做好工作.

*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.

推荐答案

PHPUnit的github存储库上的自述文件对此有说明.向下滚动到从Git Checkout使用PHPUnit 以获得可以将n-paste复制到您的shell中的命令列表.

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.

这篇关于没有安装的PHPUNIT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆