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

Installs

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

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