PHPUNIT without installation(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?
我问这个是因为在我的工作场所没有人想尝试一些单元测试或 TDD,但我很确定当我在测试的帮助下进行编程时我可以做得更好,而且我想展示我的事后它有效"的同事,而不仅仅是通过谈话*.
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,查看可以复制粘贴到 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 无需安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHPUNIT 无需安装
基础教程推荐
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在多维数组中查找最大值 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01