Tuesday, April 17, 2007

PHPUnit::SpaceOdysseyTest




class SpaceOdysseyTest extends PHPUnit_Framework_TestCase {
public function setUp() {
$spacecraft = new Spacecraft();
$spacecraft->addOccupant("Dave");
$spacecraft->addOccupant("HAL 9000");

$this->spacecraft = $spacecraft;
}

public function testSanity() {
$this->assertFalse($this->spacecraft
->getOccupant("HAL 9000")
->check("I can let Dave do that"));
}

public function tearDown() {

    }
}
Post a Comment