Skip to content

Instantly share code, notes, and snippets.

@tonini
Created March 6, 2013 09:08
Show Gist options
  • Save tonini/5097895 to your computer and use it in GitHub Desktop.
Save tonini/5097895 to your computer and use it in GitHub Desktop.
(cabbage-vendor 'php-mode)
(defun tonini-php-run-single-file (filename)
(compile (format "%s %s %s"
"phpunit -c "
(format "%s%s" (cabbage-project-root) "build-config/")
filename)))
(defun tonini-php-mode-hook ()
(when (and buffer-file-name (string-match "Test.php$" buffer-file-name))
(setq cabbage-testing-execute-function 'tonini-php-run-single-file)))
(add-hook 'php-mode-hook 'tonini-php-mode-hook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment