brodkinca / BCA-Laravel-Inspect

Inspect your code via the Artisan CLI using industry-standard tools.
MIT License
50 stars 8 forks source link

Allow user to specify level for Fixer #7

Open triopter opened 10 years ago

triopter commented 10 years ago

i.e. artisan inspect:fix --level=psr-2

Thanks for all your work on this project -- it's a lifesaver!

brodkin commented 10 years ago

This is a good idea, but I don't know when I'll have time to implement new features on this project. I'll accept a PR if anyone is interested.

triopter commented 10 years ago

This may be a silly question, but can you please provide more in-depth guidance on running the unit tests?

I've got the package installed in the context of a Laravel application (and artisan inspect:<whatever> commands work. I can run the application test suite, but running phpunit vandor/bca/laravel-inspect/tests results in an error (looks like some sort of problem with autoloading only in the context of the test suite).

Fatal error: Class 'BCA\LaravelInspect\Tests\InspectCommandTestCase' not found in /home/vagrant/src/Oyster/workbench/bca/laravel-inspect/tests/InspectFixCommandTest.php on line 22

Call Stack:
    0.0008     225824   1. {main}() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/phpunit:0
    0.0483    1392456   2. PHPUnit_TextUI_Command::main() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/phpunit:56
    0.0483    1393080   3. PHPUnit_TextUI_Command->run() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/TextUI/Command.php:138
    0.0483    1395696   4. PHPUnit_TextUI_Command->handleArguments() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/TextUI/Command.php:148
    0.1777    2720360   5. PHPUnit_Util_Configuration->getTestSuiteConfiguration() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/TextUI/Command.php:696
    0.2298    4424904   6. PHPUnit_Util_Configuration->getTestSuite() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/Util/Configuration.php:845
    0.2819    4427704   7. PHPUnit_Framework_TestSuite->addTestFiles() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/Util/Configuration.php:924
    0.2819    4428512   8. PHPUnit_Framework_TestSuite->addTestFile() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/Framework/TestSuite.php:435
    0.2824    4467808   9. PHPUnit_Util_Fileloader::checkAndLoad() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/Framework/TestSuite.php:363
    0.2836    4467960  10. PHPUnit_Util_Fileloader::load() /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/Util/Fileloader.php:77
    0.2862    4472216  11. include_once('/home/vagrant/src/Oyster/workbench/bca/laravel-inspect/tests/InspectFixCommandTest.php') /home/vagrant/src/Oyster/vendor/phpunit/phpunit/src/Util/Fileloader.php:93

I can't find any information online on how to install an existing package in the workbench (as opposed to creating a new package) and my feeble attempt didn't accomplish anything installing as a vendor package doesn't.