<?php
require_once( 'PHPUnit/Framework.php' );
require_once( '<what-ever-you-need>' );
class <YourClass>TestCase extends PHPUnit_Framework_TestCase
{
public function setUp()
{
}
public function tearDown()
{
}
/**
* If you want to provide different data to multiple calls to test functions,
* return an array of data; each data element results in a call to
* the test function.
*/
public static function providerTestExecute()
{
return array(
array( 0 ),
array( 1 ),
array( 2 )
);
}
/**
* Test some functionality.
*
* This line makes PHPunit call providerTestExecute with however many
* datasets (arrays are there).
* @dataProvider providerTestExecute
*/
public function testExecute( $code=0 )
{
$this->assertTrue( $code == 2 );
}
}
?>