美文网首页
mac开发工具使用

mac开发工具使用

作者: 爱吃橙子的高先森 | 来源:发表于2017-06-23 15:00 被阅读0次

    如何在mac中使用phpunit?

    1、网站https://phar.phpunit.de 查看phpunit版本 我的是7.0所以使用phpunit-5.7.0.phar

    2、进入usr/local/bin 目录 wget (刚刚phpunit.phar地址) 例如 wget https://phar.phpunit.de/phpunit-5.7.0.phar) 等待下载完成

    3、使用命令更改[phpunit-5.7.0.phar 运行权限:chmod +x phpunit.phar

    4、 使用mv命令将 phpunit-5.7.0.phar 文件改名为phpunit mv phpunit.phar phpunit

    5、 IDE配置

    1、Preferences =》Languages & Frameworks =》PHP =》Include path中添加/usr/local/bin
    2、Preferences =》Languages & Frameworks =》PHP =》PHPUnit =》Path to phpunit.phar

    SDK单元测试方法:
    1、全部单元测试:在IDEA的Terminal中的当前项目根目录下使用命令:phpunit
    2、单个单元测试:在IDEA的Terminal中的当前项目根目录下使用命令:phpunit test/Xxxxx/Services/Xxx/getXxxxxxTest.php

    至此,配置成功。 good luck!

    相关文章

      网友评论

          本文标题:mac开发工具使用

          本文链接:https://www.haomeiwen.com/subject/vweccxtx.html