Home

Awesome

FTT

Single-file drop-in Function Testing Tool (FTT) and auto-documenter.

Getting Started

Download

Download the latest version of FTT:

$ curl -L http://github.com/sandeepshetty/ftt/tarball/master | tar xvz
$ mv sandeepshetty-ftt-* ftt

Usage

Example

answer.php
<?php

	function answer()
	{
		return 42;
	}

?>
answer.test.php
<?php

	function test_answer()
	{
		should_return(42, when_passed('The Ultimate Question of Life, the Universe, and Everything'));
		should_return(42, when_passed('foobar'));
	}

?>

To run the test visit:

http://localhost/path/to/answer.php/ftt.php

To auto-refresh every few seconds, add the query paramter refresh_in. For example, to auto refresh every 5 seconds:

http://example.com/dir/to/test/ftt.php?refresh_in=5