views:

98

answers:

1

I'm playing a bit with beta version of PHP Storm (PHP version of WebIDE) and its integration of PHPUnit. I know how to set a profile to run tests in particular file, directory or class. Problem is, I'd like to create some profile where Run button would run tests in currently opened file.

Any idea if there's a way to do it? Or perhaps it isn't implemented in beta version yet?

+1  A: 

Open a context run/debug menu via Ctrl-Alt-F9 (this depends on your OS, look at Run|Debug... menu item), then look at lines marked with 2 & 3 - they correspond to current file and test. Press number to invoke.

You can record a macro with Tools|Record Macro and add a shortcut via Settings|Keymap|Macros. Do not forget to make a Copy on default keymap before attempting a change.

Alexey Gopachenko
Thanks a lot, appreciated!
Ondrej Slinták