PHPUnit allows you to automatically generate the skeleton of the Test class from you already writen down class.
I have developed a simple example class object named Car.php.
Just invoking the PhpUnit using the attribute –skeleton.
$phpunit –skeleton Car
Altough, not everything is perfect, PHPUnit dos not takes into consideration method parameters.
On my previously designed Object Car, my constructor was :
public function __construct($brand,$model)
On the automatic generated test class, CarTest.php on the setUp() method you can see that the Car object invocation is done using:
$this->object = new Car();
This will return on an obvious PHP and PHPUnit error.
My advice is to, use the skeleton for generating the Test Class Skeleton, because it saves time, but at the end you need to go deep on the class, and take care of methds and parameters.