Git Product home page Git Product logo

phpunit.el's Introduction

phpunit.el

License GPL 3

  • Master MELPA Stable Circle CI Coverage Status
  • Develop : Melpa Status Circle CI Coverage Status

Manage the PHPUnit tests from Emacs (>= 24.3)

Installation

The recommended way to install phpunit.el is via MELPA:

M-x package-install phpunit.el

or Cask:

(depends-on "phpunit.el")

Usage

Available commands

These functions are available :

  • phpunit-current-test: launch unit tests for the current test in a class
  • phpunit-current-class: launch unit tests for the current class
  • phpunit-current-project: launch all unit tests
  • phpunit-group: launch PHPUnit for group

You can create some key bindings with these commands:

(define-key web-mode-map (kbd "C-t t") 'phpunit-current-test)
(define-key web-mode-map (kbd "C-t c") 'phpunit-current-class)
(define-key web-mode-map (kbd "C-t p") 'phpunit-current-project)

or use the minor mode :

(add-to-list 'auto-mode-alist '("\\.php$'" . phpunit-mode))

Configuration

The following configuration variables are available:

(setq phpunit-configuration-file "phpunit.xml")
(setq phpunit-root-directory "./")

Development

Cask

phpunit.el use Cask for dependencies management. Install it and retrieve dependencies :

$ curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python
$ export PATH="$HOME/.cask/bin:$PATH"
$ cask

Testing

  • Launch unit tests from shell

      $ make clean test
    
  • Using overseer :

Keybinding Description
C-c , t launch unit tests from buffer
C-c , b launch unit tests
C-c , g launch unit tests with tag (find, regexp, ...)
  • Tips:

If you want to launch a single unit test, add a specify tag :

(ert-deftest test-foobar ()
  :tags '(current)

And launch it using : C-c , g and specify tag : current

Support / Contribute

See here

Changelog

A changelog is available here.

License

See LICENSE.

Contact

Nicolas Lamirault [email protected]

phpunit.el's People

Contributors

nlamirault avatar zonuexe avatar muddletoes avatar syohex avatar ryckes avatar claytonrcarter avatar jflearn avatar tarsius avatar purcell avatar mallt avatar wangchen 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.