学习及测试记录-log
用一个别人开发好的composer, 最近在集成腾讯滑动验证码, 用到这个包 tekintian/tekintcaptcha
github-url: https://github.com/tekintian/TekinTCaptcha
composer-url: https://packagist.org/packages/tekintian/tekintcaptcha
现在如果发现这个包有需要改进的, 要如何修改呢?
step1: 目录文件夹准备好
|– ~/test
|–|– dev_code
|–|– test_code
step2: 拉取github地址项目到dev_code文件夹中
step3: 在文件夹test_code中建立文件 composer.json 内容如下
{
"name": "tekintian/tekintcaptcha-test",
"type": "library",
"require": {
"tekintian/tekintcaptcha": "dev-master"
},
"repositories": {
"tekintian": {
"type": "path",
"url": "../dev_code/TekinTCaptcha"
}
}
}
step4: 在test_code目录中执行命令 composer install
, 就安装成功了. 但是可以看到test_code/vendor/tekintian/tekintcaptcha 这个文件夹是这个链接, 在改dev_code的代码就是在改test_code的代码.
这个composer包有写phpunit, 那么看看这个unit怎么玩. TekinTCaptcha-issues
vendor/tekintian/tekintcaptcha composer install
安装好依赖.
执行: ./vendor/bin/phpunit