<?php
require_once 'PHPUnit/Framework.php';
require_once dirname(__FILE__).'/../../DBO/AddOnDBO.class.php';
/**
* Test class for AddOnDBO.
* Generated by PHPUnit on 2010-05-02 at 12:08:11.
*/
class AddOnDBOTest extends PHPUnit_Framework_TestCase {
/**
* @var AddOnDBO
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp() {
$this->object = new AddOnDBO;
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown() {
}
public function test__toString() {
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
public function testGetDescription() {
$this->object->setDescription('Our Description');
$this->assertEquals($this->object->getDescription(), 'Our Description');
}
public function testGetID() {
$this->object->setID(346);
$this->assertEquals($this->object->getID(), 346);
}
public function testGetName() {
$this->object->setName('Louis Bernard');
$this->assertEquals($this->object->getName(), 'Louis Bernard');
}
public function testLoad() {
$data = array();
$this->object->setID(-1);
$this->object->load($data);
}
public function testSetDescription() {
$this->object->setDescription('Our Description');
$this->assertEquals($this->object->getDescription(), 'Our Description');
$this->object->setDescription(null);
$this->assertNull($this->object->getDescription());
}
public function testSetID() {
$this->object->setID(346);
$this->assertEquals($this->object->getID(), 346);
$this->object->setID(null);
$this->assertNull($this->object->getID());
}
public function testSetName() {
$this->object->setName('Louis Bernard');
$this->assertEquals($this->object->getName(), 'Louis Bernard');
$this->object->setName('Red Buttons');
$this->assertEquals($this->object->getName(), 'Red Buttons');
}
}
?>