sublime-phpunit icon indicating copy to clipboard operation
sublime-phpunit copied to clipboard

test files need to end in Test to enable context menu

Open abiusx opened this issue 9 years ago • 1 comments

Hi, I wanted two things that the plugin didn't easily satisfy:

  1. 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.
  2. 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.

abiusx avatar Oct 30 '16 14:10 abiusx

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.

stuartherbert avatar Oct 30 '16 15:10 stuartherbert