Skip to content

Ddam/SimplePHPUnit-for-Sublime-Text

 
 

Repository files navigation

SimplePHPUnit

This plugin allows you the run PHPUnit tests straight from the Sublime Text interface.

Available commands

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

Colored output:

Coloring output

Installation:

  1. Use Package Control to install SimplePHPUnit
  2. Download and unzip the plugin files to <Your ST2-ST3 Packages Directory>\SimplePHPUnit\

Usage:

  1. Press Cmd + Shift + P to open the control palette
  2. Search for PHPUnit: and pick your command

Also you can use the Tools --> PHPUnit... menu item, or set up custom keybindings

Keybinding:

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
    }
}

Notes:

  • 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 the Tools --> Build Results --> Show Build Results menu item to view results.

Donate:

If you liked this plugin, you can donate to support it!

Paypal donate

Give some feedback.

Thanks.

About

Sublime Text 3 plugin for PHPUnit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 64.1%
  • JavaScript 35.9%