Coder Social home page Coder Social logo

seldaek / sublime-phpunit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stuartherbert/sublime-phpunit

3.0 3.0 0.0 96 KB

PHPUnit Support for Sublime Text 2

Home Page: https://github.com/stuartherbert/sublime-phpunit

License: Other

Python 100.00%

sublime-phpunit's Introduction

Sublime PHPUnit

This plugin adds PHPUnit support to Sublime Text 2.

Installation

Use Sublime Text 2's Package Control (Preferences -> Package Control -> Install Package -> PHPUnit) to install this plugin.

PHPUnit Support For Sublime Text 2

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

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-PHP 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 :)

sublime-phpunit's People

Contributors

stuartherbert avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.