Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

test files need to end in Test to enable context menu #64

Open
abiusx opened this issue Oct 30, 2016 · 1 comment
Open

test files need to end in Test to enable context menu #64

abiusx opened this issue Oct 30, 2016 · 1 comment

Comments

@abiusx
Copy link

abiusx commented Oct 30, 2016

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.
@stuartherbert
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants