 	)
 
 
+(defun opac3-run-phpunit(debug-mode)
+	"Run all phpunit tests"
+	(interactive "P" )
+	(opac3-compile-phpunit nil debug-mode)
+	)
+
+
+(defun opac3-run-phpunit-filtered-file(debug-mode)
+	"Run phpunit on this file / class"
+	(interactive "P")
+	(opac3-compile-phpunit 
+	 (car (split-string (file-name-sans-extension (opac3-cur-file)) "Test"))
+	 debug-mode)
+	)
+
+
+(defun opac3-run-phpunit-filtered-class(debug-mode)
+	"Run phpunit on this class"
+	(interactive "P")
+	(opac3-compile-phpunit (phpunit-class-ap) debug-mode)
+	)
+
+
+(defun opac3-run-phpunit-filtered-function(debug-mode)
+	"Run phpunit on this function"
+	(interactive "P")
+	(opac3-compile-phpunit (cdr (phpunit-function-ap)) debug-mode)
+	)
+
+
 (defun opac3-run-last-phpunit-command()
 	"Run last phpunit command"
 	(interactive)
 	(compile opac3-phpunit-command)
 )
-
-
-(defun opac3-cur-file ()
-  "Return the filename (without directory) of the current buffer"
-  (file-name-nondirectory (buffer-file-name (current-buffer)))
-  )
-
-
-(defun opac3-run-phpunit-filtered-file()
-	"Run phpunit on this file / class"
-	(interactive)
-	(opac3-compile-phpunit (car (split-string (file-name-sans-extension (opac3-cur-file)) "Test")))
-	)
-
-
-(defun opac3-run-phpunit-filtered-class()
-	"Run phpunit on this class"
-	(interactive)
-	(opac3-compile-phpunit (phpunit-class-ap))
-	)
-
-
-(defun opac3-run-phpunit-filtered-function()
-	"Run phpunit on this function"
-	(interactive)
-	(opac3-compile-phpunit (cdr (phpunit-function-ap)))
-	)
 
 
 (defun opac3-run-phpunit-filtered-custom(custom-filter debug)

	(require 'geben)
	(require 'phpunit)
	(auto-complete-mode)
	(imenu-add-menubar-index)
  (setq 
	 tab-width 2

		("\C-crm" . opac3-run-phpunit-filtered-custom)
		("\C-crl" . opac3-run-last-phpunit-command)
		("\C-crp" . opac3-run-phpunit)
		("\C-crd" . opac3-debug-phpunit-function)
		("\C-ce" . opac3-eval-region)
		("\C-cf" . opac3-strftime))
	:after-hook 'opac3-mode-hook)

(provide 'opac3)
