Skip to content

Instantly share code, notes, and snippets.

@kamermans
Created March 16, 2014 02:15
Show Gist options
  • Save kamermans/9577574 to your computer and use it in GitHub Desktop.
Save kamermans/9577574 to your computer and use it in GitHub Desktop.
Add empty PHPUnit test files for each PHP file in your project
#!/bin/bash
for FILE in $(find ./src/ -type f -name "*.php" | sed -e 's#/src/#/tests/#' -e 's#\.php$#Test.php#'); do
mkdir -p $(dirname $FILE) 2>/dev/null
touch "$FILE"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment