3 -----------------------*/
4 define ('DB_TYPE', 'mysql');
5 define ('DB_HOST', 'localhost');
6 define ('DB_USER', 'root');
7 define ('DB_PASS', 'ASD');
8 define ('DB_NAME', 'b');
10 usingPackage ('models/foo');
11 usingPackage ('models/sqldrivers');
12 usingPackage ('coreexceptions');
14 include_once ('dummytable.class.php'); // the definition of the entity
15 include_once ('dataobject.class.php'); // the definition of the data object
17 class fooTdoTest
extends UnitTestCase
{
18 public function test_Instantiation () {
21 $this->assertIsA($o, 'fooTdoA');
24 public function testGetConnection () {
26 $o->setConnection (sqlFactory
::connect('mysql'));
27 $this->assertIsA($o->getConnection(), 'mySqlIm');
30 public function testCreateSQL () {
31 // we should have a separate test for each type of connection
32 // the test should be the actual creation
33 $o = new dummyTable();
36 $createSQL = $oC->outputCreateSQL($o);
38 d (alltrim($createSQL));