12pt/ivy-phpunit


Ivy interface to PHPUnit.

Language: Emacs Lisp

Keywords: ivy, php, phpunit, testing


ivy-phpunit

Quick-select your PHP functions in your PHPUnit test classes. This builds off helm-phpunit’s test function selecting but also provides additional utility.

Usage

Bind ivy-phpunit-select-test to a keybinding and then call from within your test class. Select a method to pass to PHPUnit and presto - your test will be run.

(add-hook 'php-mode-hook (lambda ()
                           (local-set-key (kbd "C-x t") 'ivy-phpunit-test-function)
                           (local-set-key (kbd "C-x c") 'ivy-phpunit-test-class)
                           (local-set-key (kbd "C-x C") 'ivy-phpunit-list-test-classes)))

ivy-phpunit-test-class and ivy-phpunit-list-test-classes can be called anywhere in the current PHP project; for now ivy-phpunit-test-function is just for running tests in the current buffer (i.e. a test you’re editing).

Customize

Ignored test functions

Currently you can select or deselect test functions to not be listed in the prompt - default is to not list setUp and tearDown.

Changing this outside of M-x customize is as simple as:

(setq ivy-phpunit-ignorelist '("myIgnoredFunction"))

Obviously to ignore nothing, pass an empty list.

Credit

And obviously PHPUnit.

Project Statistics

Sourcerank 2
Repository Size 18.6 KB
Stars 0
Forks 1
Watchers 1
Open issues 0
Dependencies 0
Contributors 1
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Daniel

Packages Referencing this Repo

ivy-phpunit
Ivy integration for phpunit.el
Latest release - Published

Something wrong with this page? Make a suggestion

Last synced: 2018-03-02 12:46:24 UTC

Login to resync this repository