;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\210\311\312\313\314\315\316\317\320\307\304& \207" [require phpunit ivy custom-declare-group ivy-phpunit nil "Quick running of PHPUnit tests." :group convenience custom-declare-variable ivy-phpunit-ignorelist '("setUp" "tearDown") "Functions to ignore when listing test candidates." :type (repeat string) :options ("setUpBeforeClass" "tearDownAfterClass")] 10) #@60 Regular expression for PHPUnit's response to --list-tests. (defconst ivy-phpunit-list-tests "^ - \\(?1:[[:word:]]+\\)::\\(?2:[[:word:]]+\\)$" (#$ . 512) \.) #@84 Find all the PHP function names in the current buffer and insert them into a list. (defalias 'ivy-phpunit--find-funcs #[nil "\305\211\212eb\210\306\n\305\307#\203/\310\311! \235\204\310\311!\211 \235\203' \210\202+\f B)\202) *\207" [quote funcs php-beginning-of-defun-regexp ivy-phpunit-ignorelist #1=#:x nil search-forward-regexp t match-string-no-properties 1] 5 (#$ . 675)]) #@127 Run a test given its name via FUNC-NAME. If non-nil, use FILENAME as the name of the file the test class/FUNC-NAME exists in. (defalias 'ivy-phpunit--test-func #[(func-name &optional filename) "\206 \304\305!\306\307 \310\n\311&\312 !*\207" [filename buffer-file-name func-name args s-concat shell-quote-argument " --filter '" phpunit-get-current-class "::" "'" phpunit-run] 7 (#$ . 1071)]) #@131 Split the string OUTPUT into a list of (classname . testname). Expecting OUTPUT to be the result of running phpunit --list-tests. (defalias 'ivy-phpunit--parse-tests #[(output) "\304\305\306\n #\203\307\310 \"\307\311 \"DB\304\225\202*\207" [matches pos ivy-phpunit-list-tests output 0 nil string-match match-string-no-properties 1 2] 4 (#$ . 1476)]) #@87 Convert the TEST-NAMES list of (class . function) to a flat list of just the classes. (defalias 'ivy-phpunit--filter-classes #[(test-names) "\301\302\303\"!\207" [test-names delete-dups mapcar car] 4 (#$ . 1844)]) #@89 Convert the TEST-NAMES list of (class . function) to a flat list of just the functions. (defalias 'ivy-phpunit--filter-functions #[(test-names) "\301\302\303\"!\207" [test-names delete-dups mapcar cdr] 4 (#$ . 2065)]) #@171 Attempt to get the source file for the given test. We do this by recursively searching from the project root for files matching the CLASSNAME, and picking the first one. (defalias 'ivy-phpunit--class-to-file-path #[(classname) "\302 \303\304 \305\"\"@)\207" [project-root classname phpunit-get-root-directory directory-files-recursively s-concat ".php"] 5 (#$ . 2291)]) #@161 Find all the test classes in this project. If called interactively, allow the user to quick-switch via ivy to the class. If not, just return a list of classes. (defalias 'ivy-phpunit-list-test-classes #[nil "\302\303!\304!\305\306!\203\307\310\311 !\312\313\314\315\316\317&\202 *\207" [output tests phpunit--execute "--list-tests" ivy-phpunit--parse-tests called-interactively-p any ivy-read "Edit a test: " ivy-phpunit--filter-classes :sort t :caller ivy-phpunit-list-test-classes :action #[(classname) "\301\302!!\207" [classname find-file ivy-phpunit--class-to-file-path] 3]] 9 (#$ . 2670) nil]) #@78 Find all test classes in the current project and enable the user to test it. (defalias 'ivy-phpunit-test-class #[nil "\300\301\302\303 !\304\305\306\307\310\311&\207" [ivy-read "Class to test: " ivy-phpunit--filter-classes ivy-phpunit-list-test-classes :sort t :caller ivy-phpunit-test-class :action #[(classname) "\301\302\303\304#!\207" [classname phpunit-run s-concat "--filter '" "'"] 5]] 9 (#$ . 3285) nil]) #@89 Find all the test functions in the current buffer and allow user to select one to test. (defalias 'ivy-phpunit-test-function #[nil "\300\301\302 \303\304\305\306\307\310&\207" [ivy-read "Function to test: " ivy-phpunit--find-funcs :sort t :caller ivy-phpunit-select-test :action #[(x) "\301!\207" [x ivy-phpunit--test-func] 2]] 9 (#$ . 3706) nil]) (provide 'ivy-phpunit)