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
  • 3 years ago
  • 2 hours ago
  • 6 years ago

Installs

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

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'.