2017 © Pedro Peláez
 

library phpwebunit

A simpletest like visual for phpunit. Simple and easy to use!

image

kcmerrill/phpwebunit

A simpletest like visual for phpunit. Simple and easy to use!

  • Thursday, April 25, 2013
  • by kcmerrill
  • Repository
  • 0 Watchers
  • 4 Stars
  • 59 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

PHPWebUnit

Love TDD? Love PHPUnit? Love the simplicity of SimpleTest? Me too .. this is a simple wrapper utility that lets one use phpunit in a web browser, that has the same visual clues that simpletest does., (*1)

A simple green bar, or a red bar(with phpunit output) showing the issue., (*2)

Here is a youtube video describing it's usage: http://www.youtube.com/watch?v=an5ZjEVTg0g, (*3)

It's usage is pretty simple too, depending on autoloading, you can get it down to two lines per test., (*4)

Prefered Way: Use an IDE that has a live preview functionality., (*5)

Set your base path to say: http://test.example.com/phpwebunit/index.php/ <-- You'll need to create this. In index.php have code that would look something like this:, (*6)

$sot = __DIR__ . '/../../' . implode('/', $test);
if(file_exists($sot)){
    new \kcmerrill\tdd\phpwebunit('', array('bin'=>'/usr/local/php5/bin/phpunit'), array('SCRIPT_FILENAME'=>$sot));
}

Another Way:, (*7)

//This will test the current php file
require_once __FILE__. '/phpwebunit';
new kcmerrill\tdd\phpwebunit;


//This will test the current php's directory
require_once __FILE__. '/phpwebunit';
new kcmerrill\tdd\phpwebunit(__DIR__);

Here are some screenshots: Screenshot, (*8)

Build Status, (*9)

The Versions

25/04 2013

dev-master

9999999-dev

A simpletest like visual for phpunit. Simple and easy to use!

  Sources   Download

The Requires

  • php >=5.3.0

 

by kc merrill

tdd phpunit wrapper web simpletest