Commits

Isidro Merayo Castellano  committed 090064c

add initial support to "autotest"

  • Participants
  • Parent commits 535ea88

Comments (0)

Files changed (2)

+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'phpunit', :cli => '--colors', :tests_path => 'tests',
+        :keep_failed => true, :all_after_pass => true, :command => "./vendor/bin/phpunit" do
+  watch(%r{^tests/.+Test\.php$})
+  watch(%r{^src/(.+)\.php$}) { |m| "tests/#{m[1]}Test.php" }
+end
-Simple Skeleton PHP project: Composer and Symfony2 components
-=============================================================
+Simple Skeleton PHP project: Composer and other PHP Tools
+=========================================================
 
-A simple skeleton PHP project, using composer and Symfon2 Components.
+A simple skeleton PHP project, using composer and other tools like PHPUnit.
 
 PSR-0
 
 Create your test under "tests" directory.
 Create your code under "src" directory.
 
+If you have install phpunit on your system
+
 $ phpunit -c tests/
 
 If you want to use the vendor PHPUnit
 
 You should remove "Acme" namespace ;)
 
+Autotest
+========
+
+You can autotest on save file, but you need ruby and some gems.
+
+$ gem install guard guard-phpunit
+$ gem install --version '~> 0.8.8' rb-inotify
+
+Send notify to OS, I test on GNU/Linux Ubuntu 12.04 (gnome shell).
+
+The project page: https://github.com/Maher4Ever/guard-phpunit. Guard::PHPUnit automatically runs your tests.
+There is a problem, you need install phpunit in your system but a PR solve this problem https://github.com/Maher4Ever/guard-phpunit/pull/7.
+
+
 Travis-CI
 =========