ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

PHPUnit

by stuartherbert ST2/ST3

PHPUnit Support for Sublime Text 2

Details

  • 2015.07.17.15.28.37
  • github.​com
  • github.​com
  • 4 years ago
  • 3 hours ago
  • 7 years ago

Installs

  • Total 62K
  • Win 34K
  • OS X 13K
  • Linux 15K
Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11
Windows 5 12 8 9 6 3 8 7 20 10 9 7 7 12 10 3 19 13 5 7 7 6 8 6 14 3 7 9 6 14 6 11 10 7 11 8 6 10 13 5 5 8 14 8 14 9
OS X 0 3 1 2 0 0 1 2 3 1 0 1 1 5 3 5 2 2 1 1 1 0 2 0 0 0 2 2 2 4 1 6 1 1 4 3 3 4 1 0 2 1 4 1 2 1
Linux 1 2 3 1 3 5 3 2 2 0 3 1 2 3 1 1 2 3 2 6 4 2 4 3 2 2 2 4 6 2 3 3 0 1 3 2 2 4 2 2 6 3 2 3 3 3

Readme

Source
raw.​githubusercontent.​com

Sublime PHPUnit

This plugin adds PHPUnit support to Sublime Text 2 & 3.

Installation

Use Package Control (Preferences -> Package Control -> Install Package -> PHPUnit) to install this plugin.

PHPUnit Support For Sublime Text

This plugin adds support for running PHPUnit tests from inside Sublime Text.

Right-click in the editor to:

  • Run all unit tests
  • Run the unit tests for the current file
  • Run the unit tests in the current file
  • Run PHPUnit, using the current XML config file
  • Goto the file containing the tests or the file being tested

Right-click in the side-bar to:

  • Run the unit tests in the current file
  • Run all the unit tests
  • Run PHPUnit, using the selected XML config file

You can also open up the Command Palette (CTRL + SHIFT + P on Linux), and type 'PHPUnit' to see what you can do with PHPUnit in the currently open file.

To make this work, you need to create a phpunit.xml.dist or phpunit.xml file for your code (projects using Phix get this for free). The Sublime-PHPUnit plugin searches the folders upwards from whatever you are trying to test, using the first phpunit.xml or phpunit.xml.dist that it finds. Make sure that your phpunit.xml file is either at the top of your tests folder (or even further up), and this plugin will work for you.

PHPUnit support is based on the Ruby Tests plugin

Snippets

We add the following snippets to speed up writing PHP test code.

To use any of the snippets, simply type the name of the snippet, then press the key. Sublime Text 2 will insert the snippet, and you can then use the key to move through any placeholders that you need to replace.

  • phpunit-test: create a new test method inside your TestCase class
  • phpunit-testcase: create a new TestCase class to put your tests inside

Contributions Welcome

Requests for features, and pull requests with patches, are most welcome :)

Please make sure that your pull requests are against the 'develop' branch and not 'master'.