I have a MacBook Pro, installed PEAR, installed PHPUnit, so at the command line I can type phpunit and I get the usage help.
Now I want to get a test going so that I can build from there.
I have a file named index.php with this content:
<?php
require_once '?????';
class Product {
protected $id;
public function __construct($id)
{
$this->id = $id;
}
public function get_id()
{
return $this->id;
}
}
class ProductTest extends PHPUnit_Framework_TestCase
{
function testBasis()
{
$instance = new Product(1);
$this->assertInstanceOf('Product',$instance);
$this->assert($instance->get_id(), 1);
}
}
At the command line, I want to go to the directory in which the file is located and type something like:
phpunit ?????
What are the next steps so that I am able to test the above class with PHPUnit from the command line?