* added a isCli function
[vsc.git] / _tests / models / fooTdoATest.php
blob986150c6e9a78d511dfef6c91e8f4f22f62dc27b
1 <?php
2 /* Db constants
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 include_once ('dummytable.class.php'); // the definition of the entity
11 usingPackage ('models/foo');
12 usingPackage ('models/sqldrivers');
13 usingPackage ('coreexceptions');
15 class fooTdoAbstractTest extends UnitTestCase {
16 public function test_Instantiation () {
17 $o = new fooTdo();
19 $this->assertIsA($o, 'fooTdoA');
22 public function testGetConnection () {
23 $o = new fooTdo ();
24 $o->setConnection (sqlFactory::connect('mysql'));
25 $this->assertIsA($o->getConnection(), 'mySqlIm');
28 public function testCreateSQL () {
29 $o = new dummyTable();
30 $oC = new fooTdo();
32 $this->assertEqual(1, 1);
33 $oC->outputCreateSQL($o);
37 /**
38 * mock object for testing the abstract fooTdoA
40 class fooTdo extends fooTdoA {
41 public function __construct () {
42 $this->setConnection(sqlFactory::connect('mysql'));