0.0
No commit activity in last 3 years
No release in over 3 years
AutotestForPHP is based off of ZenTest autotest which is a popular Ruby tool for running tests as soon as files get changed: * http://www.zenspider.com/ZSS/Products/ZenTest/ Code for displaying notifications is based on Carlos Brando autotest-notification gem: * http://github.com/carlosbrando/autotest-notification The tool was written on Ruby but you don't need to be a Ruby programmer in order to use it, just make sure you have Ruby and RubyGems installed: * http://www.ruby-lang.org * http://rubygems.org/read/chapter/3
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.3.2
 Project Readme

AutotestForPHP¶ ↑

DESCRIPTION:¶ ↑

AutotestForPHP is based off of ZenTest autotest which is a popular Ruby tool for running tests as soon as files get changed:

Code for displaying notifications is based on Carlos Brando autotest-notification gem:

The tool was written on Ruby but you don’t need to be a Ruby programmer in order to use it, just make sure you have Ruby and RubyGems installed:

REQUIREMENTS:¶ ↑

  • PHP5

  • PHPUnit

  • Ruby

  • RubyGems

  • Linux:

    You need to have libnotify binaries installed.
    
    For ubuntu this means: sudo apt-get install libnotify-bin
    
    Other distributions may package it with other names, do a search for libnotify using your distribution package
    manager.
    
    If you use KDE and do not have libnotify-bin installed, it will try to use kdialog which is part of KDE.
    It also works if you have zenity installed.
  • Mac:

    You need to have Growl and growlnotify installed on your machine.
    
    Download Growl[http://growl.info/index.php] and install it like any other application on your Mac.
    
    Then you must install the growlnotify.
    
    In your shell, cd to the directory on the Growl disk image containing growlnotify, and type ./install.sh.
    That script will install growlnotify to /usr/local/bin and the manpage to /usr/local/man.
  • Windows:

    You need to have Snarl and ruby-snarl installed on your machine.
    
    Download Snarl[http://www.fullphat.net/] and install it like any other application on your machine.
    
    Run in the command prompt:
    
      gem install ruby-snarl

INSTALL:¶ ↑

gem install autotestforphp --source http://gemcutter.org

USAGE¶ ↑

autotestforphp --install

autotestforphp

During instalation, AutotestForPHP will create:

1. An empty PHPUnit boostrap file on autotestforphp/bootstrap-autotest.php to be used when running tests

2. An empty config file on autotestforphp/config.autotest

3. A PHPUnit config file on autotestforphp/phpunit-autotest.xml to will configure the bootstrap file to be used,
   tests folder and log results to a XML file needed for displaying notifications:

      <phpunit bootstrap="./autotestforphp/bootstrap-autotest.php">
          <testsuite name="Application">
              <directory>./test/</directory>
          </testsuite>
          <logging>
              <log type="junit" target="./autotestforphp/logfile.xml" />
              <!-- log type="test-xml" target="./autotestforphp/logfile.xml" for PHPUnit <= 3.2 /-->
          </logging>
      </phpunit>

You can specify the folders or files to be watched on autotestforphp/config.autotest file by setting the FOLDERS_TO_WATCH Ruby constant

Example:

FOLDERS_TO_WATCH = ['./src/**/*', './app/**/*', './test/**/*', './some_specific_file.php']

If no folders are specified in config file, AutotestForPHP will watch for changes on the following folders (if they exist):

  • src

  • app

  • lib

  • test

CONTRIBUTORS:¶ ↑

TODO:¶ ↑

  • Default autotestforphp/bootstrap-autotest.php

  • Write comments about config usage on autotestforphp/config.autotest

  • Folders / files to skip

  • Check if tool was already installed and skip file creation

  • Support for SimpleTest

LICENSE:¶ ↑

(The MIT License)

Copyright © 2009

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.