dev-master
9999999-devdescription_text
The Requires
The Development Requires
by Chris Hartjes
Wallogit.com
2017 © Pedro Peláez
description_text
, (*1)
(Logo generously created by Jacques Woodcock), (*2)
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., (*3)
Executing /path/to/php tricorder.php will give you some usage information., (*4)
Please read the file LICENSE included with this code for licensing details., (*5)
phpdoc parse -d . -t
phpdoc parse -f /path/to.file -t
/path/to/php composer.phar install
/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:, (*6)
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., (*7)
description_text