sublime-phpunit
sublime-phpunit copied to clipboard
test files need to end in Test to enable context menu
Hi, I wanted two things that the plugin didn't easily satisfy:
- Test files should end in *Test.php, but not by PHPUnit, only by your plugin to enable the context menus. Checking for other artifacts such as PHPUnit_Framework_TestCase or equivalent would be wiser, or even enabling the menu and then erring on try would be better.
- It would be better to document the "commands" that your plugin defines, so that people can assign shortkeys to them. I found "phpunit_run_tests" and "phpunit_run_all_tests" and assigned keyboard shortcuts to them.
Hello,
Thanks for the feedback.
The context menu works on both PHP files containing unit tests, and the code you ship to production. We would lose some important functionality if the context menu was only available for files containing unit tests.
If you can come up with a reliable way of determining if a file contains unit tests, I'm happy to incorporate that into the plugin.
I'll update the README to document the commands that the plugin defines.