chartjes/tricorder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chartjes/tricorder

Composer 安装命令:

composer require chartjes/tricorder

包简介

description_text

README 文档

README

PHP-Tricorder logo

(Logo generously created by Jacques Woodcock)

PHP-Tricorder is a CLI utility that scans structure files created using phpDocumentor and offers suggestions on potential problems with your code along with testing strategy information.

Executing /path/to/php tricorder.php will give you some usage information.

Please read the file LICENSE included with this code for licensing details.

How To Use It

  • Install phpDocumentor using your preferred method
  • Use docblocks to describe the parameters and return types for your methods
  • To generate a structure.xml document for an entire directory recursively, use phpdoc parse -d . -t
  • To generate a structure.xml document for a specific file, use phpdoc parse -f /path/to.file -t
  • Install the dependencies using Composer /path/to/php composer.phar install
  • Process the structure.xml document using tricorder: /path/to/php tricorder.php /path/to/structure.xml

Tricorder will then give you some suggestions on things to look for when testing your classes. Here's some sample output:

chartjes@php-vm:~/php-tricorder$ php tricorder.php ../building-testable-applications/lib/IBL/structure.xml 
Reading in phpDocumentor structure file...

FranchiseMapper.php

Scanning FranchiseMapper

__construct -- mock $conn as \PDO

createFranchiseFromRow -- test $row using an empty array()

delete -- mock $franchise as \IBL\Franchise

findAll -- test method returns \IBL\Franchise instances
findByConference -- test $conference using null or empty strings

findByConferenceDivision -- test $conference using null or empty strings

findByNickname -- test $nickname using null or empty strings

findById -- test $id using non-integer values

generateMap -- test $teamsTable using null or empty strings

save -- mock $franchise as \IBL\Franchise

_insert -- non-public methods are difficult to test in isolation
_insert -- mock $franchise as \IBL\Franchise

_update -- non-public methods are difficult to test in isolation
_update -- mock $franchise as \IBL\Franchise

\IBL\Franchise might need to be injected for testing purposes
\Exception might need to be injected for testing purposes
\Exception might need to be injected for testing purposes
\Exception might need to be injected for testing purposes
\Exception might need to be injected for testing purposes
\Exception might need to be injected for testing purposes

Feel free to hit me up on Twitter and pull requests to make the tool better are always welcome.

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 83
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 83
  • Watchers: 6
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-03-31