This plugin allows you the run PHPUnit tests straight from the Sublime Text interface.
Run
This is the equivalent of running: phpunit
<sublime project root directory>
Test current file
This is the equivalent of running: phpunit
<path to current file>
Run with custom args
Opens a new input window which allows user to enter PHPUnit arguments to be added to the command. This is the equivalent of running: phpunit
<user-entered arguments>
Please see the settings file after installation to see options that could affect the behavior of these commands
- Use Package Control to install
SimplePHPUnit
- Download and unzip the plugin files to
<Your ST2-ST3 Packages Directory>\SimplePHPUnit\
- Press Cmd + Shift + P to open the control palette
- Search for
PHPUnit:
and pick your command
Also you can use the Tools --> PHPUnit...
menu item, or set up custom keybindings
You can use command simple_php_unit
for your keybinding.
Examples:
{
"keys": ["ctrl+alt+t"],
"command": "simple_php_unit"
},
{
"keys": ["super+ctrl+alt+t"],
"command": "simple_php_unit",
"args": {
"test_current_file": true
}
}
- Latest version of the plugin built and tested using PHPUnit 4.4.
- If your projects use XML configuration files for PHPUnit, be sure to specify them in your user settings.
- Enable automatic output panel display by adding
"show_panel_on_build": true
to your user settings or use theTools --> Build Results --> Show Build Results
menu item to view results.
If you liked this plugin, you can donate to support it!
Give some feedback.
Thanks.