Quick-select your PHP functions in your PHPUnit test classes. This builds off
helm-phpunit’s test function selecting but also provides additional utility.
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-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).
Ignored test functions
Currently you can select or deselect test functions to not be listed in the prompt - default is to not list
Changing this outside of
M-x customize is as simple as:
(setq ivy-phpunit-ignorelist '("myIgnoredFunction"))
Obviously to ignore nothing, pass an empty list.
And obviously PHPUnit.