Skip to content

Instantly share code, notes, and snippets.

@andersonfraga
Created July 10, 2014 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andersonfraga/342143088460160440cb to your computer and use it in GitHub Desktop.
Save andersonfraga/342143088460160440cb to your computer and use it in GitHub Desktop.
#!/usr/bin/php
<?php
require '../phpwatcher.php';
phpwatcher(['./module/','./tests/unit/'], '(.*)\.php', function ($_, $objfile) {
echo "\nChanged {$_}\n";
echo ($exec = 'cd ./tests/unit/ && phpunit .') . PHP_EOL;
system($exec);
echo PHP_EOL;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment