Created
December 26, 2017 12:38
-
-
Save diegofelix/91331afb3bbd94b8a7dee919e4168bf0 to your computer and use it in GitHub Desktop.
Run phpunit on the last modified test file. (Using Docker)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Last Modified Test File | |
alias lastModifiedTestFile="(find tests -type f -printf '%T@ %p\n' | sort -k1,1nr | head -1 | grep -oE '[^ ]+$')" | |
# this function get the last modified file that are inside the `tests` folder | |
# and run the phpunit. | |
function phpunit() { | |
echo "Testing $(lastModifiedTestFile)..."; | |
dctest $(lastModifiedTestFile); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment