thinkPHP 单元测试

官方的5.0版本的扩展库版本号都是1.*2.0版本均为ThinkPHP5.1版本专用。

我用的是5.0版本的thinkphp所以用下面的命令来安装

composer require topthink/think-testing 1.*

安装完成后,会在应用根目录下面增加tests目录和phpunit.xml文件。
默认带了一个tests/ExampleTest.php单元测试文件,我们可以直接在命令行下面运行单元测试:

php think unit

 

http://www.waitingfy.com/archives/3444

3444

Leave a Reply

Name and Email Address are required fields.
Your email will not be published or shared with third parties.