• This repository has been archived on 09/Sep/2020
  • Stars
    star
    103
  • Rank 331,220 (Top 7 %)
  • Language
    Python
  • License
    Other
  • Created over 12 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PHPUnit Support for Sublime Text 2

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

More Repositories

1

php-xxhash

PHP extension for the xxhash library
C
52
star
2

sublime-phpsnippets

A collection of miscellaneous snippets for coding in PHP using Sublime Text 2
52
star
3

ContractLib

Simple Design By Contract library for PHP components
PHP
32
star
4

if-i-knew-then

Crowdsourced ebook of experiences
CSS
26
star
5

DigitalEngineersReadingList

A recommended reading list for digital engineers everywhere
21
star
6

sublime-phix-color-scheme

A Sublime Text 2 colour scheme built around earthy colours
17
star
7

sublime-phpide

Turns Sublime Text 2 into a fully-featured PHP IDE
Python
6
star
8

putting-ansible-to-work

A free ebook on how to get started with Ansible
PHP
5
star
9

ansible-playbooks

Ansible playbooks for setting my dev workstation(s)
Shell
4
star
10

pear.phix-project.org

PEAR channel for Phix project components
Shell
4
star
11

ExceptionsLib

A simple component for simplifying PHP error handling
PHP
3
star
12

getting-hired

Home of the Getting Hired book
JavaScript
3
star
13

TasksLib

A library of classes for automating repetitive tasks
PHP
2
star
14

shoshin

Guides For The Beginners' Mind
2
star
15

vim-phix-colors

Phix color scheme for Vim
Vim Script
2
star
16

hexdump

Simple hexdump extension for PHP
C
2
star
17

Goto-Symbol

This plugin adds a command to Sublime Text 2, allowing you to jump between the symbol of your open files.
Python
2
star
18

mf

Methodosity Framework for PHP
PHP
2
star
19

phix4componentdev

Phix, and all the dependencies you need to create and maintain PHP components
PHP
2
star
20

lecturn

Lecturn Wordpress Theme
PHP
1
star
21

PropertiesLib

PHP component to manage local and global properties files
PHP
1
star
22

dotfiles

My public dotfiles for Linux and OS X
Shell
1
star
23

phix-manual

The online manual for phix
1
star
24

framework.mf.com

Methodosity Framework Website
JavaScript
1
star
25

Backhaul

A lightweight PHP framework
PHP
1
star
26

php-fundamentals

Training modules for PHP developers
1
star
27

LicenseLib

A simple component for adding license information to PHP components and files
PHP
1
star
28

Phix-Theme

Colour theme for the editor(s) I use
1
star
29

PhingTasks

A collection of additional tasks for Phing
1
star
30

PhpInfo

A simple example component that installs a phpinfo.php script
PHP
1
star
31

FopTools

Unmodified upstream Apache FOP for use with Docbook conversions
Shell
1
star
32

MF_Autoloader

Generic autoloader component
PHP
1
star
33

www.phix-project.org

Website for Phix project
Shell
1
star
34

MF_Exception

Generic enterprise-class exception classes
PHP
1
star
35

DocbookTools

Tools for working with Docbook sources
JavaScript
1
star
36

stuartherbert.github.com

JavaScript
1
star
37

aim-higher

Advice that has helped me to be successful over the years
CSS
1
star