Browse files

Updating pre-commit hook. #408

  • Loading branch information...
1 parent 9c4310c commit eab909245f49f8a655adf88d1dcbfe60b62365ac @jmathai jmathai committed Jun 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 documentation/hooks/pre-commit
View
4 documentation/hooks/pre-commit
@@ -4,11 +4,11 @@
* Git pre-commit hook
* To use this just symlink it to .git/hooks/pre-commit or copy it there and make modifications as needed.
*/
-$baseDir = dirname(dirname(dirname(__FILE__)));
+$baseDir = sprintf('%s/src/tests', dirname(dirname(dirname(__FILE__))));
chdir($baseDir);
printf("%sGit pre-commit hook %1\$s", PHP_EOL);
$projectName = basename(getcwd());
-exec('phpunit src/tests/', $output, $returnCode); // Assuming cwd here
+exec('phpunit --configuration phpunit.xml ./', $output, $returnCode); // Assuming cwd here
if ($returnCode !== 0) {
$minimalTestSummary = array_pop($output);
printf("Test suite for %s failed: ", $projectName);

0 comments on commit eab9092

Please sign in to comment.